First patches to get to .21 kernel
SVN-Revision: 7365
This commit is contained in:
parent
73cb36fd43
commit
bab2982a68
4 changed files with 5902 additions and 14603 deletions
|
@ -1,12 +1,13 @@
|
|||
# CONFIG_AEABI is not set
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
# CONFIG_APM is not set
|
||||
# CONFIG_ARCH_AAEC2000 is not set
|
||||
CONFIG_ARCH_AT91=y
|
||||
CONFIG_ARCH_AT91RM9200=y
|
||||
# CONFIG_ARCH_AT91RM9200DK is not set
|
||||
# CONFIG_ARCH_AT91SAM9260 is not set
|
||||
# CONFIG_ARCH_AT91SAM9261 is not set
|
||||
# CONFIG_ARCH_AT91SAM9263 is not set
|
||||
# CONFIG_ARCH_AT91SAM9RL is not set
|
||||
# CONFIG_ARCH_CLPS711X is not set
|
||||
# CONFIG_ARCH_CLPS7500 is not set
|
||||
# CONFIG_ARCH_CO285 is not set
|
||||
|
@ -15,8 +16,11 @@ CONFIG_ARCH_AT91RM9200=y
|
|||
# CONFIG_ARCH_EP93XX is not set
|
||||
# CONFIG_ARCH_FOOTBRIDGE is not set
|
||||
# CONFIG_ARCH_H720X is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
|
||||
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
|
||||
# CONFIG_ARCH_IMX is not set
|
||||
# CONFIG_ARCH_INTEGRATOR is not set
|
||||
# CONFIG_ARCH_IOP13XX is not set
|
||||
# CONFIG_ARCH_IOP32X is not set
|
||||
# CONFIG_ARCH_IOP33X is not set
|
||||
# CONFIG_ARCH_IXP2000 is not set
|
||||
|
@ -25,6 +29,7 @@ CONFIG_ARCH_AT91RM9200=y
|
|||
# CONFIG_ARCH_L7200 is not set
|
||||
# CONFIG_ARCH_LH7A40X is not set
|
||||
# CONFIG_ARCH_NETX is not set
|
||||
# CONFIG_ARCH_NS9XXX is not set
|
||||
# CONFIG_ARCH_OMAP is not set
|
||||
# CONFIG_ARCH_PNX4008 is not set
|
||||
# CONFIG_ARCH_PXA is not set
|
||||
|
@ -41,12 +46,13 @@ CONFIG_ARM_THUMB=y
|
|||
# CONFIG_ARTHUR is not set
|
||||
# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
|
||||
CONFIG_AT91_SPI=y
|
||||
CONFIG_AT91_SPIDEV=y
|
||||
CONFIG_AT91_VLIO=y
|
||||
# CONFIG_AT91_SPIDEV is not set
|
||||
# CONFIG_ATMEL_TCLIB is not set
|
||||
# CONFIG_ATM_DUMMY is not set
|
||||
# CONFIG_ATM_TCP is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
# CONFIG_BINFMT_AOUT is not set
|
||||
CONFIG_BITREVERSE=y
|
||||
# CONFIG_BLK_DEV_LOOP is not set
|
||||
# CONFIG_BLK_DEV_NBD is not set
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
|
@ -55,6 +61,7 @@ CONFIG_BLK_DEV_RAM_COUNT=16
|
|||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
# CONFIG_BONDING is not set
|
||||
# CONFIG_BRIDGE_NETFILTER is not set
|
||||
# CONFIG_BROADCOM_PHY is not set
|
||||
# CONFIG_BSD_DISKLABEL is not set
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
# CONFIG_BT is not set
|
||||
|
@ -102,7 +109,6 @@ CONFIG_DAVICOM_PHY=y
|
|||
# CONFIG_DEBUG_USER is not set
|
||||
# CONFIG_DM9000 is not set
|
||||
CONFIG_DUMMY_CONSOLE=y
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
# CONFIG_FIXED_PHY is not set
|
||||
# CONFIG_FPE_FASTFPE is not set
|
||||
CONFIG_FPE_NWFPE=y
|
||||
|
@ -110,11 +116,15 @@ CONFIG_FPE_NWFPE=y
|
|||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
# CONFIG_FW_LOADER is not set
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
# CONFIG_GENERIC_TIME is not set
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HID=y
|
||||
# CONFIG_HID_DEBUG is not set
|
||||
CONFIG_HW_CONSOLE=y
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
CONFIG_HZ=100
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_IEEE80211 is not set
|
||||
# CONFIG_IKCONFIG is not set
|
||||
|
@ -136,9 +146,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
|||
# CONFIG_IP6_NF_TARGET_LOG is not set
|
||||
# CONFIG_IP_DCCP is not set
|
||||
# CONFIG_IP_NF_ARPTABLES is not set
|
||||
# CONFIG_IP_NF_CT_PROTO_SCTP is not set
|
||||
# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
|
||||
# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
|
||||
# CONFIG_IP_NF_TARGET_LOG is not set
|
||||
# CONFIG_IP_NF_TARGET_NETMAP is not set
|
||||
# CONFIG_IP_NF_TARGET_SAME is not set
|
||||
|
@ -154,23 +162,22 @@ CONFIG_LEGACY_PTY_COUNT=32
|
|||
# CONFIG_MACH_AT91RM9200EK is not set
|
||||
# CONFIG_MACH_ATEB9200 is not set
|
||||
# CONFIG_MACH_CARMEVA is not set
|
||||
# CONFIG_MACH_CHUB is not set
|
||||
# CONFIG_MACH_CSB337 is not set
|
||||
# CONFIG_MACH_CSB637 is not set
|
||||
# CONFIG_MACH_KAFA is not set
|
||||
# CONFIG_MACH_KB9200 is not set
|
||||
# CONFIG_MACH_ONEARM is not set
|
||||
CONFIG_MACH_VLINK=y
|
||||
CONFIG_MINI_FO=y
|
||||
CONFIG_MMC=m
|
||||
CONFIG_MMC_AT91=m
|
||||
CONFIG_MMC_BLOCK=m
|
||||
# CONFIG_MMC_DEBUG is not set
|
||||
# CONFIG_MMC_TIFM_SD 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_AT91_DATAFLASH is not set
|
||||
CONFIG_MTD_BLKDEVS=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
# CONFIG_MTD_BLOCK2MTD is not set
|
||||
# CONFIG_MTD_CFI is not set
|
||||
|
@ -217,16 +224,17 @@ CONFIG_MTD_PARTITIONS=y
|
|||
# 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_PCCARD is not set
|
||||
# CONFIG_OUTER_CACHE is not set
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_PM is not set
|
||||
# CONFIG_PNPACPI is not set
|
||||
# CONFIG_PPPOATM is not set
|
||||
# CONFIG_PPPOL2TP is not set
|
||||
# CONFIG_PPP_MULTILINK is not set
|
||||
# CONFIG_PPP_SYNC_TTY is not set
|
||||
# CONFIG_QSEMI_PHY is not set
|
||||
|
@ -247,6 +255,8 @@ CONFIG_SERIO_SERPORT=y
|
|||
# CONFIG_SOUND is not set
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=4096
|
||||
CONFIG_SYSVIPC_SYSCTL=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_UID16=y
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_USB is not set
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,5 @@
|
|||
diff -Naur linux-2.6.19.1/arch/arm/boot/compressed/head-at91rm9200.S linux/arch/arm/boot/compressed/head-at91rm9200.S
|
||||
--- linux-2.6.19.1/arch/arm/boot/compressed/head-at91rm9200.S 2006-12-11 20:32:53.000000000 +0100
|
||||
+++ linux/arch/arm/boot/compressed/head-at91rm9200.S 2007-01-20 10:26:21.000000000 +0100
|
||||
--- linux-2.6.21.1.orig/arch/arm/boot/compressed/head-at91rm9200.S 2007-05-28 12:22:29.000000000 +0200
|
||||
+++ linux-2.6.21.1/arch/arm/boot/compressed/head-at91rm9200.S 2007-05-28 12:52:16.000000000 +0200
|
||||
@@ -61,6 +61,12 @@
|
||||
cmp r7, r3
|
||||
beq 99f
|
||||
|
@ -14,15 +13,15 @@ diff -Naur linux-2.6.19.1/arch/arm/boot/compressed/head-at91rm9200.S linux/arch/
|
|||
@ Ajeco 1ARM : 1075
|
||||
mov r3, #(MACH_TYPE_ONEARM & 0xff)
|
||||
orr r3, r3, #(MACH_TYPE_ONEARM & 0xff00)
|
||||
diff -Naur linux-2.6.19.1/arch/arm/mach-at91rm9200/board-vlink.c linux/arch/arm/mach-at91rm9200/board-vlink.c
|
||||
--- linux-2.6.19.1/arch/arm/mach-at91rm9200/board-vlink.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux/arch/arm/mach-at91rm9200/board-vlink.c 2007-01-19 21:18:00.000000000 +0100
|
||||
@@ -0,0 +1,144 @@
|
||||
--- linux-2.6.21.1.orig/arch/arm/mach-at91/board-vlink.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.21.1/arch/arm/mach-at91/board-vlink.c 2007-05-28 13:09:54.000000000 +0200
|
||||
@@ -0,0 +1,160 @@
|
||||
+/*
|
||||
+ * linux/arch/arm/mach-at91rm9200/board-ek.c
|
||||
+ * linux/arch/arm/mach-at91/board-vlink.c
|
||||
+ *
|
||||
+ * Copyright (C) 2005 SAN People
|
||||
+ * Copyright (C) 2006,2007 Guthrie Consulting
|
||||
+ *
|
||||
+ * Copyright (C) 2006,2007 Hamish Guthrie
|
||||
+ * Guthrie Consulting.
|
||||
+ *
|
||||
+ * 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
|
||||
|
@ -45,6 +44,7 @@ diff -Naur linux-2.6.19.1/arch/arm/mach-at91rm9200/board-vlink.c linux/arch/arm/
|
|||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+#include <linux/mtd/physmap.h>
|
||||
+
|
||||
+#include <asm/hardware.h>
|
||||
+#include <asm/setup.h>
|
||||
|
@ -57,6 +57,7 @@ diff -Naur linux-2.6.19.1/arch/arm/mach-at91rm9200/board-vlink.c linux/arch/arm/
|
|||
+
|
||||
+#include <asm/arch/board.h>
|
||||
+#include <asm/arch/gpio.h>
|
||||
+#include <asm/arch/at91rm9200_mc.h>
|
||||
+
|
||||
+#include "generic.h"
|
||||
+
|
||||
|
@ -89,7 +90,7 @@ diff -Naur linux-2.6.19.1/arch/arm/mach-at91rm9200/board-vlink.c linux/arch/arm/
|
|||
+ at91rm9200_init_interrupts(NULL);
|
||||
+}
|
||||
+
|
||||
+static struct eth_platform_data __initdata vlink_eth_data = {
|
||||
+static struct at91_eth_data __initdata vlink_eth_data = {
|
||||
+ .phy_irq_pin = AT91_PIN_PC4,
|
||||
+ .is_rmii = 1,
|
||||
+};
|
||||
|
@ -103,13 +104,12 @@ diff -Naur linux-2.6.19.1/arch/arm/mach-at91rm9200/board-vlink.c linux/arch/arm/
|
|||
+ .pullup_pin = AT91_PIN_PD5,
|
||||
+};
|
||||
+
|
||||
+/*static struct at91_mmc_data __initdata ek_mmc_data = {
|
||||
+ .det_pin = AT91_PIN_PB27,
|
||||
+ .is_b = 0,
|
||||
+static struct at91_mmc_data __initdata vlink_mmc_data = {
|
||||
+// .det_pin = AT91_PIN_PB27,
|
||||
+ .slot_b = 0,
|
||||
+ .wire4 = 1,
|
||||
+ .wp_pin = AT91_PIN_PA17,
|
||||
+// .wp_pin = AT91_PIN_PA17,
|
||||
+};
|
||||
+*/
|
||||
+
|
||||
+static struct spi_board_info vlink_spi_devices[] = {
|
||||
+ { /* DataFlash chip */
|
||||
|
@ -126,6 +126,19 @@ diff -Naur linux-2.6.19.1/arch/arm/mach-at91rm9200/board-vlink.c linux/arch/arm/
|
|||
+#endif
|
||||
+};
|
||||
+
|
||||
+static struct at91_gpio_led vlink_leds[] = {
|
||||
+ {
|
||||
+ .name = "led0",
|
||||
+ .gpio = AT91_PIN_PB1,
|
||||
+ .trigger = "heartbeat",
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "led1",
|
||||
+ .gpio = AT91_PIN_PB2,
|
||||
+ .trigger = "timer",
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+static void __init vlink_board_init(void)
|
||||
+{
|
||||
+ /* Serial */
|
||||
|
@ -147,9 +160,10 @@ diff -Naur linux-2.6.19.1/arch/arm/mach-at91rm9200/board-vlink.c linux/arch/arm/
|
|||
+#else
|
||||
+ /* MMC */
|
||||
+// at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
|
||||
+// at91_add_device_mmc(&vlink_mmc_data);
|
||||
+ at91_add_device_mmc(0, &vlink_mmc_data);
|
||||
+#endif
|
||||
+ /* VGA */
|
||||
+ /* LEDs */
|
||||
+ at91_gpio_leds(vlink_leds, ARRAY_SIZE(vlink_leds));
|
||||
+}
|
||||
+
|
||||
+MACHINE_START(VLINK, "FDL VersaLink")
|
||||
|
@ -162,12 +176,11 @@ diff -Naur linux-2.6.19.1/arch/arm/mach-at91rm9200/board-vlink.c linux/arch/arm/
|
|||
+ .init_irq = vlink_init_irq,
|
||||
+ .init_machine = vlink_board_init,
|
||||
+MACHINE_END
|
||||
diff -Naur linux-2.6.19.1/arch/arm/mach-at91rm9200/Kconfig linux/arch/arm/mach-at91rm9200/Kconfig
|
||||
--- linux-2.6.19.1/arch/arm/mach-at91rm9200/Kconfig 2006-12-11 20:32:53.000000000 +0100
|
||||
+++ linux/arch/arm/mach-at91rm9200/Kconfig 2007-01-19 21:17:49.000000000 +0100
|
||||
@@ -82,6 +82,12 @@
|
||||
--- linux-2.6.21.1.orig/arch/arm/mach-at91/Kconfig 2007-05-28 12:22:29.000000000 +0200
|
||||
+++ linux-2.6.21.1/arch/arm/mach-at91/Kconfig 2007-05-28 13:11:45.000000000 +0200
|
||||
@@ -96,6 +96,12 @@
|
||||
help
|
||||
Select this if you are using Sperry-Sun's KAFA board.
|
||||
Select this if you are using Promwad's Chub board.
|
||||
|
||||
+config MACH_VLINK
|
||||
+ bool "Figment Design Labs VersaLink"
|
||||
|
@ -178,14 +191,21 @@ diff -Naur linux-2.6.19.1/arch/arm/mach-at91rm9200/Kconfig linux/arch/arm/mach-a
|
|||
endif
|
||||
|
||||
# ----------------------------------------------------------
|
||||
diff -Naur linux-2.6.19.1/arch/arm/mach-at91rm9200/Makefile linux/arch/arm/mach-at91rm9200/Makefile
|
||||
--- linux-2.6.19.1/arch/arm/mach-at91rm9200/Makefile 2006-12-11 20:32:53.000000000 +0100
|
||||
+++ linux/arch/arm/mach-at91rm9200/Makefile 2007-01-19 21:17:42.000000000 +0100
|
||||
@@ -24,6 +24,7 @@
|
||||
obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
|
||||
--- linux-2.6.21.1.orig/arch/arm/mach-at91/Makefile 2007-05-28 12:22:29.000000000 +0200
|
||||
+++ linux-2.6.21.1/arch/arm/mach-at91/Makefile 2007-05-28 13:13:15.000000000 +0200
|
||||
@@ -29,6 +29,7 @@
|
||||
obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o
|
||||
obj-$(CONFIG_MACH_KAFA) += board-kafa.o
|
||||
obj-$(CONFIG_MACH_CHUB) += board-chub.o
|
||||
+obj-$(CONFIG_MACH_VLINK) += board-vlink.o
|
||||
|
||||
# AT91SAM9260 board-specific support
|
||||
obj-$(CONFIG_MACH_AT91SAM9260EK) += board-sam9260ek.o
|
||||
@@ -51,6 +52,7 @@
|
||||
led-$(CONFIG_MACH_CSB637) += leds.o
|
||||
led-$(CONFIG_MACH_KB9200) += leds.o
|
||||
led-$(CONFIG_MACH_KAFA) += leds.o
|
||||
+led-$(CONFIG_MACH_VLINK) += leds.o
|
||||
obj-$(CONFIG_LEDS) += $(led-y)
|
||||
|
||||
# VGA support
|
||||
|
|
|
@ -1,24 +1,92 @@
|
|||
diff -urN linux-2.6.19.2.old/arch/arm/mach-at91rm9200/Makefile linux-2.6.19.2/arch/arm/mach-at91rm9200/Makefile
|
||||
--- linux-2.6.19.2.old/arch/arm/mach-at91rm9200/Makefile 2007-03-06 11:29:37.000000000 +0100
|
||||
+++ linux-2.6.19.2/arch/arm/mach-at91rm9200/Makefile 2007-03-06 20:52:28.000000000 +0100
|
||||
@@ -40,6 +40,7 @@
|
||||
diff -urN linux-2.6.21.1.orig/arch/arm/mach-at91/board-vlink.c linux-2.6.21.1/arch/arm/mach-at91/board-vlink.c
|
||||
--- linux-2.6.21.1.orig/arch/arm/mach-at91/board-vlink.c 2007-05-28 13:33:41.000000000 +0200
|
||||
+++ linux-2.6.21.1/arch/arm/mach-at91/board-vlink.c 2007-05-28 14:43:28.000000000 +0200
|
||||
@@ -61,7 +61,7 @@
|
||||
at91rm9200_initialize(18432000, AT91RM9200_PQFP);
|
||||
|
||||
/* Setup the LEDs */
|
||||
-// at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
|
||||
+ at91_init_leds(AT91_PIN_PC14, AT91_PIN_PC15);
|
||||
|
||||
/* Setup the serial ports and console */
|
||||
at91_init_serial(&vlink_uart_config);
|
||||
@@ -81,10 +81,12 @@
|
||||
.ports = 1,
|
||||
};
|
||||
|
||||
+/*
|
||||
static struct at91_udc_data __initdata vlink_udc_data = {
|
||||
.vbus_pin = AT91_PIN_PD4,
|
||||
.pullup_pin = AT91_PIN_PD5,
|
||||
};
|
||||
+*/
|
||||
|
||||
static struct at91_mmc_data __initdata vlink_mmc_data = {
|
||||
// .det_pin = AT91_PIN_PB27,
|
||||
@@ -108,18 +110,19 @@
|
||||
#endif
|
||||
};
|
||||
|
||||
-static struct at91_gpio_led vlink_leds[] = {
|
||||
+/*static struct at91_gpio_led vlink_leds[] = {
|
||||
{
|
||||
.name = "led0",
|
||||
- .gpio = AT91_PIN_PB1,
|
||||
+ .gpio = AT91_PIN_PC14,
|
||||
.trigger = "heartbeat",
|
||||
},
|
||||
{
|
||||
.name = "led1",
|
||||
- .gpio = AT91_PIN_PB2,
|
||||
+ .gpio = AT91_PIN_PC15,
|
||||
.trigger = "timer",
|
||||
}
|
||||
};
|
||||
+*/
|
||||
|
||||
static void __init vlink_board_init(void)
|
||||
{
|
||||
@@ -130,8 +133,8 @@
|
||||
/* USB Host */
|
||||
at91_add_device_usbh(&vlink_usbh_data);
|
||||
/* USB Device */
|
||||
- at91_add_device_udc(&vlink_udc_data);
|
||||
- at91_set_multi_drive(vlink_udc_data.pullup_pin, 1); /* pullup_pin is connected to reset */
|
||||
+// at91_add_device_udc(&vlink_udc_data);
|
||||
+// at91_set_multi_drive(vlink_udc_data.pullup_pin, 1); /* pullup_pin is connected to reset */
|
||||
/* I2C */
|
||||
at91_add_device_i2c();
|
||||
/* SPI */
|
||||
@@ -145,7 +148,7 @@
|
||||
at91_add_device_mmc(0, &vlink_mmc_data);
|
||||
#endif
|
||||
/* LEDs */
|
||||
- at91_gpio_leds(vlink_leds, ARRAY_SIZE(vlink_leds));
|
||||
+// at91_gpio_leds(vlink_leds, ARRAY_SIZE(vlink_leds));
|
||||
}
|
||||
|
||||
MACHINE_START(VLINK, "FDL VersaLink")
|
||||
diff -urN linux-2.6.21.1.orig/arch/arm/mach-at91/Makefile linux-2.6.21.1/arch/arm/mach-at91/Makefile
|
||||
--- linux-2.6.21.1.orig/arch/arm/mach-at91/Makefile 2007-05-28 13:13:15.000000000 +0200
|
||||
+++ linux-2.6.21.1/arch/arm/mach-at91/Makefile 2007-05-28 14:19:06.000000000 +0200
|
||||
@@ -52,7 +52,7 @@
|
||||
led-$(CONFIG_MACH_CSB637) += leds.o
|
||||
led-$(CONFIG_MACH_KB9200) += leds.o
|
||||
led-$(CONFIG_MACH_KAFA) += leds.o
|
||||
-led-$(CONFIG_MACH_VLINK) += leds.o
|
||||
+led-$(CONFIG_MACH_VLINK) += vlink_leds.o
|
||||
obj-$(CONFIG_LEDS) += $(led-y)
|
||||
|
||||
# VGA support
|
||||
diff -urN linux-2.6.19.2.old/arch/arm/mach-at91rm9200/vlink_leds.c linux-2.6.19.2/arch/arm/mach-at91rm9200/vlink_leds.c
|
||||
--- linux-2.6.19.2.old/arch/arm/mach-at91rm9200/vlink_leds.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.2/arch/arm/mach-at91rm9200/vlink_leds.c 2007-03-06 21:11:16.000000000 +0100
|
||||
@@ -0,0 +1,151 @@
|
||||
diff -urN linux-2.6.21.1.orig/arch/arm/mach-at91/vlink_leds.c linux-2.6.21.1/arch/arm/mach-at91/vlink_leds.c
|
||||
--- linux-2.6.21.1.orig/arch/arm/mach-at91/vlink_leds.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.21.1/arch/arm/mach-at91/vlink_leds.c 2007-05-28 14:41:03.000000000 +0200
|
||||
@@ -0,0 +1,105 @@
|
||||
+/*
|
||||
+ * LED driver for Atmel AT91-based boards.
|
||||
+ *
|
||||
+ * Copyright (C) SAN People (Pty) Ltd
|
||||
+ *
|
||||
+ * Modified for FDL Versalink board (c) Guthrie Consulting
|
||||
+ * Modified for FDL VersaLink Copyright (C) Guthrie Consulting
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
|
@ -35,10 +103,6 @@ diff -urN linux-2.6.19.2.old/arch/arm/mach-at91rm9200/vlink_leds.c linux-2.6.19.
|
|||
+#include <asm/arch/board.h>
|
||||
+#include <asm/arch/gpio.h>
|
||||
+
|
||||
+#define LED_CPU 0
|
||||
+#define LED_TIMER 1
|
||||
+#define LED_COM1 2
|
||||
+#define LED_COM2 3
|
||||
+
|
||||
+static inline void at91_led_on(unsigned int led)
|
||||
+{
|
||||
|
@ -52,13 +116,14 @@ diff -urN linux-2.6.19.2.old/arch/arm/mach-at91rm9200/vlink_leds.c linux-2.6.19.
|
|||
+
|
||||
+static inline void at91_led_toggle(unsigned int led)
|
||||
+{
|
||||
+ unsigned long is_off = at91_get_gpio_value(AT91_PIN_PC7);
|
||||
+ unsigned long is_off = at91_get_gpio_value(led);
|
||||
+ if (is_off) {
|
||||
+ at91_set_gpio_value(AT91_PIN_PC7, 0);
|
||||
+ at91_set_gpio_value(AT91_PIN_PC8, 1);
|
||||
+ } else {
|
||||
+ at91_set_gpio_value(AT91_PIN_PC7, 1);
|
||||
+ at91_set_gpio_value(AT91_PIN_PC8, 0);
|
||||
+ at91_led_on(led);
|
||||
+ at91_led_off(at91_leds_cpu);
|
||||
+ }
|
||||
+ else {
|
||||
+ at91_led_on(at91_leds_cpu);
|
||||
+ at91_led_off(led);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
|
@ -66,6 +131,11 @@ diff -urN linux-2.6.19.2.old/arch/arm/mach-at91rm9200/vlink_leds.c linux-2.6.19.
|
|||
+/*
|
||||
+ * Handle LED events.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * VersaLink has a single bi-coloured LED which changes colour when the
|
||||
+ * polarity is reversed
|
||||
+ */
|
||||
+static void at91_leds_event(led_event_t evt)
|
||||
+{
|
||||
+ unsigned long flags;
|
||||
|
@ -74,20 +144,11 @@ diff -urN linux-2.6.19.2.old/arch/arm/mach-at91rm9200/vlink_leds.c linux-2.6.19.
|
|||
+
|
||||
+ switch(evt) {
|
||||
+ case led_start: /* System startup */
|
||||
+// at91_led_on(at91_leds_cpu);
|
||||
+ at91_led_toggle(at91_leds_timer);
|
||||
+/*
|
||||
+ at91_set_gpio_value(AT91_PIN_PC7, 0);
|
||||
+ at91_set_gpio_value(AT91_PIN_PC8, 1);
|
||||
+*/
|
||||
+ break;
|
||||
+
|
||||
+ case led_stop: /* System stop / suspend */
|
||||
+ at91_led_toggle(at91_leds_timer);
|
||||
+/*
|
||||
+ at91_set_gpio_value(AT91_PIN_PC7, 1);
|
||||
+ at91_set_gpio_value(AT91_PIN_PC8, 0);
|
||||
+*/
|
||||
+ break;
|
||||
+
|
||||
+#ifdef CONFIG_LEDS_TIMER
|
||||
|
@ -99,18 +160,10 @@ diff -urN linux-2.6.19.2.old/arch/arm/mach-at91rm9200/vlink_leds.c linux-2.6.19.
|
|||
+#ifdef CONFIG_LEDS_CPU
|
||||
+ case led_idle_start: /* Entering idle state */
|
||||
+ at91_led_toggle(at91_leds_timer);
|
||||
+/*
|
||||
+ at91_set_gpio_value(AT91_PIN_PC7, 1);
|
||||
+ at91_set_gpio_value(AT91_PIN_PC8, 0);
|
||||
+*/
|
||||
+ break;
|
||||
+
|
||||
+ case led_idle_end: /* Exit idle state */
|
||||
+ at91_led_toggle(at91_leds_timer);
|
||||
+/*
|
||||
+ at91_set_gpio_value(AT91_PIN_PC7, 0);
|
||||
+ at91_set_gpio_value(AT91_PIN_PC8, 1);
|
||||
+*/
|
||||
+ break;
|
||||
+#endif
|
||||
+
|
||||
|
@ -124,38 +177,8 @@ diff -urN linux-2.6.19.2.old/arch/arm/mach-at91rm9200/vlink_leds.c linux-2.6.19.
|
|||
+
|
||||
+static int __init leds_init(void)
|
||||
+{
|
||||
+/* if (!at91_leds_timer || !at91_leds_cpu)
|
||||
+ if (!at91_leds_timer || !at91_leds_cpu)
|
||||
+ return -ENODEV;
|
||||
+*/
|
||||
+// printk("leds_init()\n");
|
||||
+
|
||||
+ /* Enable PIO to access the LEDs */
|
||||
+ at91_set_gpio_output(AT91_PIN_PC7, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PC8, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PC14, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PC15, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PB14, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PB15, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PB16, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PB17, 1);
|
||||
+
|
||||
+ at91_set_gpio_output(AT91_PIN_PB9, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PB10, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PB11, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PB12, 1);
|
||||
+
|
||||
+ at91_set_gpio_input(AT91_PIN_PB8, 1);
|
||||
+ at91_set_gpio_input(AT91_PIN_PB22, 1);
|
||||
+ at91_set_gpio_input(AT91_PIN_PA19, 1);
|
||||
+ at91_set_gpio_input(AT91_PIN_PA24, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PA29, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PB2, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PB3, 1);
|
||||
+ at91_set_gpio_output(AT91_PIN_PB4, 1);
|
||||
+
|
||||
+ at91_set_gpio_input(AT91_PIN_PB27, 1);
|
||||
+ at91_set_gpio_input(AT91_PIN_PB28, 1);
|
||||
+ at91_set_gpio_input(AT91_PIN_PB29, 1);
|
||||
+
|
||||
+ leds_event = at91_leds_event;
|
||||
+
|
||||
|
|
Loading…
Reference in a new issue