Upgrade rb500 to .22.1, add the LED driver from #986

SVN-Revision: 8015
lede-17.01
Florian Fainelli 2007-07-17 10:25:18 +00:00
parent e5520b8853
commit eb097e3068
4 changed files with 97 additions and 20 deletions

View File

@ -11,7 +11,7 @@ BOARD:=rb532
BOARDNAME:=Mikrotik RouterBoard 532 BOARDNAME:=Mikrotik RouterBoard 532
FEATURES:=jffs2 FEATURES:=jffs2
LINUX_VERSION:=2.6.21.5 LINUX_VERSION:=2.6.22.1
include $(INCLUDE_DIR)/kernel-build.mk include $(INCLUDE_DIR)/kernel-build.mk

View File

@ -4,6 +4,7 @@ CONFIG_32BIT=y
# CONFIG_8139TOO is not set # CONFIG_8139TOO is not set
# CONFIG_ARCH_HAS_ILOG2_U32 is not set # CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set # CONFIG_ARCH_HAS_ILOG2_U64 is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
# CONFIG_ATM is not set # CONFIG_ATM is not set
# CONFIG_AX25 is not set # CONFIG_AX25 is not set
CONFIG_BASE_SMALL=0 CONFIG_BASE_SMALL=0
@ -39,6 +40,7 @@ CONFIG_CPU_SUPPORTS_HIGHMEM=y
# CONFIG_CPU_TX49XX is not set # CONFIG_CPU_TX49XX is not set
# CONFIG_CPU_VR41XX is not set # CONFIG_CPU_VR41XX is not set
# CONFIG_DDB5477 is not set # CONFIG_DDB5477 is not set
CONFIG_DEVPORT=y
# CONFIG_DM9000 is not set # CONFIG_DM9000 is not set
CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_DMA_NEED_PCI_MAP_STATE=y
CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NONCOHERENT=y
@ -48,6 +50,7 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y
# CONFIG_GENERIC_GPIO is not set # CONFIG_GENERIC_GPIO is not set
# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
# CONFIG_GEN_RTC is not set # CONFIG_GEN_RTC is not set
CONFIG_HAS_DMA=y
CONFIG_HAS_IOMEM=y CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y CONFIG_HAS_IOPORT=y
CONFIG_HW_HAS_PCI=y CONFIG_HW_HAS_PCI=y
@ -58,6 +61,7 @@ CONFIG_INITRAMFS_SOURCE=""
CONFIG_IRQ_CPU=y CONFIG_IRQ_CPU=y
CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_DEBUG=0
CONFIG_KORINA=y CONFIG_KORINA=y
CONFIG_LEDS_RB500=y
# CONFIG_MACH_ALCHEMY is not set # CONFIG_MACH_ALCHEMY is not set
# CONFIG_MACH_DECSTATION is not set # CONFIG_MACH_DECSTATION is not set
# CONFIG_MACH_JAZZ is not set # CONFIG_MACH_JAZZ is not set
@ -66,35 +70,19 @@ CONFIG_MIKROTIK_RB500=y
CONFIG_MINI_FO=m CONFIG_MINI_FO=m
CONFIG_MIPS=y CONFIG_MIPS=y
# CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_ATLAS is not set
# CONFIG_MIPS_BOSPORUS is not set
# CONFIG_MIPS_COBALT is not set # CONFIG_MIPS_COBALT is not set
# CONFIG_MIPS_DB1000 is not set
# CONFIG_MIPS_DB1100 is not set
# CONFIG_MIPS_DB1200 is not set
# CONFIG_MIPS_DB1500 is not set
# CONFIG_MIPS_DB1550 is not set
# CONFIG_MIPS_EV64120 is not set # CONFIG_MIPS_EV64120 is not set
CONFIG_MIPS_L1_CACHE_SHIFT=4 CONFIG_MIPS_L1_CACHE_SHIFT=4
# CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_MALTA is not set
# CONFIG_MIPS_MIRAGE is not set
# CONFIG_MIPS_MTX1 is not set
CONFIG_MIPS_MT_DISABLED=y CONFIG_MIPS_MT_DISABLED=y
# CONFIG_MIPS_MT_SMP is not set # CONFIG_MIPS_MT_SMP is not set
# CONFIG_MIPS_MT_SMTC is not set # CONFIG_MIPS_MT_SMTC is not set
# CONFIG_MIPS_PB1000 is not set
# CONFIG_MIPS_PB1100 is not set
# CONFIG_MIPS_PB1200 is not set
# CONFIG_MIPS_PB1500 is not set
# CONFIG_MIPS_PB1550 is not set
# CONFIG_MIPS_SEAD is not set # CONFIG_MIPS_SEAD is not set
# CONFIG_MIPS_SIM is not set # CONFIG_MIPS_SIM is not set
# CONFIG_MIPS_VPE_LOADER is not set # CONFIG_MIPS_VPE_LOADER is not set
# CONFIG_MIPS_XXS1500 is not set
# CONFIG_MOMENCO_JAGUAR_ATX is not set
# CONFIG_MOMENCO_OCELOT is not set # CONFIG_MOMENCO_OCELOT is not set
# CONFIG_MOMENCO_OCELOT_3 is not set # CONFIG_MOMENCO_OCELOT_3 is not set
# CONFIG_MOMENCO_OCELOT_C is not set # CONFIG_MOMENCO_OCELOT_C is not set
# CONFIG_MOMENCO_OCELOT_G is not set
CONFIG_MTD=y CONFIG_MTD=y
# CONFIG_MTD_ABSENT is not set # CONFIG_MTD_ABSENT is not set
CONFIG_MTD_BLKDEVS=y CONFIG_MTD_BLKDEVS=y
@ -131,7 +119,6 @@ CONFIG_MTD_NAND_IDS=y
# CONFIG_MTD_NAND_PLATFORM is not set # CONFIG_MTD_NAND_PLATFORM is not set
CONFIG_MTD_NAND_RB500=y CONFIG_MTD_NAND_RB500=y
CONFIG_MTD_NAND_VERIFY_WRITE=y CONFIG_MTD_NAND_VERIFY_WRITE=y
# CONFIG_MTD_OBSOLETE_CHIPS is not set
# CONFIG_MTD_ONENAND is not set # CONFIG_MTD_ONENAND is not set
CONFIG_MTD_PARTITIONS=y CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_PHRAM is not set # CONFIG_MTD_PHRAM is not set
@ -143,9 +130,9 @@ CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_SLRAM is not set # CONFIG_MTD_SLRAM is not set
# CONFIG_NATSEMI is not set # CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set # CONFIG_NE2K_PCI is not set
# CONFIG_NETDEV_1000 is not set
CONFIG_NET_SCH_FIFO=y CONFIG_NET_SCH_FIFO=y
# CONFIG_NET_VENDOR_3COM is not set # CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NETDEV_1000 is not set
# CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_16KB is not set
CONFIG_PAGE_SIZE_4KB=y CONFIG_PAGE_SIZE_4KB=y
# CONFIG_PAGE_SIZE_64KB is not set # CONFIG_PAGE_SIZE_64KB is not set
@ -158,6 +145,7 @@ CONFIG_PAGE_SIZE_4KB=y
# CONFIG_RTC is not set # CONFIG_RTC is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_SCSI_WAIT_SCAN=m
# CONFIG_SERIAL_8250_EXTENDED is not set # CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP22 is not set
# CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP27 is not set
@ -187,6 +175,7 @@ CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
CONFIG_TRAD_SIGNALS=y CONFIG_TRAD_SIGNALS=y
# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_UNUSED_SYMBOLS is not set
# CONFIG_USB is not set # CONFIG_USB is not set
# CONFIG_VGASTATE is not set
CONFIG_VIA_RHINE=y CONFIG_VIA_RHINE=y
# CONFIG_VIA_RHINE_MMIO is not set # CONFIG_VIA_RHINE_MMIO is not set
CONFIG_VIA_RHINE_NAPI=y CONFIG_VIA_RHINE_NAPI=y
@ -202,3 +191,4 @@ CONFIG_YAFFS_FS=y
CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
CONFIG_YAFFS_YAFFS1=y CONFIG_YAFFS_YAFFS1=y
CONFIG_YAFFS_YAFFS2=y CONFIG_YAFFS_YAFFS2=y
CONFIG_ZONE_DMA_FLAG=0

View File

@ -139,11 +139,17 @@ static struct platform_device nand_slot0 = {
.num_resources = ARRAY_SIZE(nand_slot0_res), .num_resources = ARRAY_SIZE(nand_slot0_res),
}; };
static struct platform_device rb500led = {
.name = "rb500-led",
.id = 0,
};
static struct platform_device *rb500_devs[] = { static struct platform_device *rb500_devs[] = {
&korina_dev0, &korina_dev0,
&nand_slot0, &nand_slot0,
&cf_slot0 &cf_slot0,
&rb500led
}; };
static void __init parse_mac_addr(char* macstr) static void __init parse_mac_addr(char* macstr)

View File

@ -0,0 +1,81 @@
/*
* linux/drivers/leds/leds-rb500.c
*
* Copyright (C) 2006
* Twente Institute for Wireless and Mobile Communications BV
*
* 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.
*
* This program is distributed in the hope that 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 (see file GPLv2).
*
* Author: Tjalling Hattink <tjalling.hattink@ti-wmc.nl>
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/leds.h>
#include <asm/rc32434/rb.h>
static void rb500led_amber_set(struct led_classdev *led_cdev, enum led_brightness value)
{
if (value)
changeLatchU5(LO_ULED, 0);
else
changeLatchU5(0, LO_ULED);
}
static struct led_classdev rb500_amber_led = {
.name = "rb500led:amber",
.default_trigger = "ide-disk",
.brightness_set = rb500led_amber_set,
};
static int rb500led_probe(struct platform_device *pdev)
{
int ret;
changeLatchU5(0, LO_ULED);
ret = led_classdev_register(&pdev->dev, &rb500_amber_led);
return ret;
}
static int rb500led_remove(struct platform_device *pdev)
{
led_classdev_unregister(&rb500_amber_led);
return 0;
}
static struct platform_driver rb500led_driver = {
.probe = rb500led_probe,
.remove = rb500led_remove,
.driver = {
.name = "rb500-led",
},
};
static int __init rb500led_init(void)
{
return platform_driver_register(&rb500led_driver);
}
static void __exit rb500led_exit(void)
{
platform_driver_unregister(&rb500led_driver);
}
module_init(rb500led_init);
module_exit(rb500led_exit);
MODULE_AUTHOR("tjalling.hattink@ti-wmc.nl");
MODULE_DESCRIPTION("Mikrotik RB500 LED driver");
MODULE_LICENSE("GPL");