diff options
author | John Crispin <john@openwrt.org> | 2012-03-25 08:50:09 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2012-03-25 08:50:09 +0000 |
commit | 0f6a9d5c7c938f40657ca30f588479893606781e (patch) | |
tree | cdf2baca2c9b0021baa2c2aa256dee52b627028c /target/linux/lantiq/files-3.1/arch | |
parent | c49f66675e04441b7089abb2aec1e95bda0dfe78 (diff) | |
download | upstream-0f6a9d5c7c938f40657ca30f588479893606781e.tar.gz upstream-0f6a9d5c7c938f40657ca30f588479893606781e.tar.bz2 upstream-0f6a9d5c7c938f40657ca30f588479893606781e.zip |
bump kernel to 3.2.12
SVN-Revision: 31060
Diffstat (limited to 'target/linux/lantiq/files-3.1/arch')
23 files changed, 0 insertions, 2428 deletions
diff --git a/target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-buttons.h b/target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-buttons.h deleted file mode 100644 index adb531c39b..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-buttons.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Lantiq GPIO button support - * - * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org> - * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> - * - * 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. - */ - -#ifndef _LANTIQ_DEV_GPIO_BUTTONS_H -#define _LANTIQ_DEV_GPIO_BUTTONS_H - -#include <linux/input.h> -#include <linux/gpio_keys.h> - -#define LTQ_KEYS_POLL_INTERVAL 20 /* msecs */ -#define LTQ_KEYS_DEBOUNCE_INTERVAL (3 * LTQ_KEYS_POLL_INTERVAL) - -void ltq_register_gpio_keys_polled(int id, - unsigned poll_interval, - unsigned nbuttons, - struct gpio_keys_button *buttons); - -#endif /* _LANTIQ_DEV_GPIO_BUTTONS_H */ diff --git a/target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-leds.h b/target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-leds.h deleted file mode 100644 index d51e496d14..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-leds.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Lantiq GPIO LED device support - * - * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org> - * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> - * - * 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. - */ - -#ifndef _LANTIQ_DEV_LEDS_GPIO_H -#define _LANTIQ_DEV_LEDS_GPIO_H - -#include <linux/leds.h> - -void ltq_add_device_gpio_leds(int id, - unsigned num_leds, - struct gpio_led *leds) __init; - -#endif /* _LANTIQ_DEV_LEDS_GPIO_H */ diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-buttons.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-buttons.c deleted file mode 100644 index ad25cac797..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-buttons.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Lantiq GPIO button support - * - * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org> - * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> - * - * 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/init.h> -#include <linux/slab.h> -#include <linux/platform_device.h> - -#include <dev-gpio-buttons.h> - -void __init ltq_register_gpio_keys_polled(int id, - unsigned poll_interval, - unsigned nbuttons, - struct gpio_keys_button *buttons) -{ - struct platform_device *pdev; - struct gpio_keys_platform_data pdata; - struct gpio_keys_button *p; - int err; - - p = kmalloc(nbuttons * sizeof(*p), GFP_KERNEL); - if (!p) - return; - - memcpy(p, buttons, nbuttons * sizeof(*p)); - - pdev = platform_device_alloc("gpio-keys-polled", id); - if (!pdev) - goto err_free_buttons; - - memset(&pdata, 0, sizeof(pdata)); - pdata.poll_interval = poll_interval; - pdata.nbuttons = nbuttons; - pdata.buttons = p; - - err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); - if (err) - goto err_put_pdev; - - err = platform_device_add(pdev); - if (err) - goto err_put_pdev; - - return; - -err_put_pdev: - platform_device_put(pdev); - -err_free_buttons: - kfree(p); -} diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-leds.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-leds.c deleted file mode 100644 index 89dc79de61..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-leds.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Lantiq GPIO LED device support - * - * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org> - * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> - * - * Parts of this file are based on Atheros' 2.6.15 BSP - * - * 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/init.h> -#include <linux/slab.h> -#include <linux/platform_device.h> - -#include <dev-gpio-leds.h> - -void __init ltq_add_device_gpio_leds(int id, unsigned num_leds, - struct gpio_led *leds) -{ - struct platform_device *pdev; - struct gpio_led_platform_data pdata; - struct gpio_led *p; - int err; - - p = kmalloc(num_leds * sizeof(*p), GFP_KERNEL); - if (!p) - return; - - memcpy(p, leds, num_leds * sizeof(*p)); - - pdev = platform_device_alloc("leds-gpio", id); - if (!pdev) - goto err_free_leds; - - memset(&pdata, 0, sizeof(pdata)); - pdata.num_leds = num_leds; - pdata.leds = p; - - err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); - if (err) - goto err_put_pdev; - - err = platform_device_add(pdev); - if (err) - goto err_put_pdev; - - return; - -err_put_pdev: - platform_device_put(pdev); - -err_free_leds: - kfree(p); -} diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/addon-easy98000.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/addon-easy98000.c deleted file mode 100644 index 2085a1c77d..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/addon-easy98000.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * EASY98000 CPLD Addon driver - * - * Copyright (C) 2011 Thomas Langer <thomas.langer@lantiq.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/version.h> -#include <linux/types.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/errno.h> -#include <linux/slab.h> -#include <linux/proc_fs.h> -#include <linux/seq_file.h> - -struct easy98000_reg_cpld { - u16 cmdreg1; /* 0x1 */ - u16 cmdreg0; /* 0x0 */ - u16 idreg0; /* 0x3 */ - u16 resreg; /* 0x2 */ - u16 intreg; /* 0x5 */ - u16 idreg1; /* 0x4 */ - u16 ledreg; /* 0x7 */ - u16 pcmconconfig; /* 0x6 */ - u16 res0; /* 0x9 */ - u16 ethledreg; /* 0x8 */ - u16 res1[4]; /* 0xa-0xd */ - u16 cpld1v; /* 0xf */ - u16 cpld2v; /* 0xe */ -}; -static struct easy98000_reg_cpld * const cpld = - (struct easy98000_reg_cpld *)(KSEG1 | 0x17c00000); -#define cpld_r8(reg) (__raw_readw(&cpld->reg) & 0xFF) -#define cpld_w8(val, reg) __raw_writew((val) & 0xFF, &cpld->reg) - -int easy98000_addon_has_dm9000(void) -{ - if ((cpld_r8(idreg0) & 0xF) == 1) - return 1; - return 0; -} - -#if defined(CONFIG_PROC_FS) -typedef void (*cpld_dump) (struct seq_file *s); -struct proc_entry { - char *name; - void *callback; -}; - -static int cpld_proc_show ( struct seq_file *s, void *p ) -{ - cpld_dump dump = s->private; - - if ( dump != NULL ) - dump(s); - - return 0; -} - -static int cpld_proc_open ( struct inode *inode, struct file *file ) -{ - return single_open ( file, cpld_proc_show, PDE(inode)->data ); -} - -static void cpld_versions_get ( struct seq_file *s ) -{ - seq_printf(s, "CPLD1: V%d\n", cpld_r8(cpld1v)); - seq_printf(s, "CPLD2: V%d\n", cpld_r8(cpld2v)); -} - -static void cpld_ebu_module_get ( struct seq_file *s ) -{ - u8 addon_id; - - addon_id = cpld_r8(idreg0) & 0xF; - switch (addon_id) { - case 0xF: /* nothing connected */ - break; - case 1: - seq_printf(s, "Ethernet Controller module (dm9000)\n"); - break; - default: - seq_printf(s, "Unknown EBU module (EBU_ID=0x%02X)\n", addon_id); - break; - } -} - -static void cpld_xmii_module_get ( struct seq_file *s ) -{ - u8 addon_id; - char *mod = NULL; - - addon_id = cpld_r8(idreg1) & 0xF; - switch (addon_id) { - case 0xF: - mod = "no module"; - break; - case 0x1: - mod = "RGMII module"; - break; - case 0x4: - mod = "GMII MAC Mode (XWAY TANTOS-3G)"; - break; - case 0x6: - mod = "TMII MAC Mode (XWAY TANTOS-3G)"; - break; - case 0x8: - mod = "GMII PHY module"; - break; - case 0x9: - mod = "MII PHY module"; - break; - case 0xA: - mod = "RMII PHY module"; - break; - default: - break; - } - if (mod) - seq_printf(s, "%s\n", mod); - else - seq_printf(s, "unknown xMII module (xMII_ID=0x%02X)\n", addon_id); -} - -static struct proc_entry proc_entries[] = { - {"versions", cpld_versions_get}, - {"ebu", cpld_ebu_module_get}, - {"xmii", cpld_xmii_module_get}, -}; - -static struct file_operations ops = { - .owner = THIS_MODULE, - .open = cpld_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -static void cpld_proc_entry_create(struct proc_dir_entry *parent_node, - struct proc_entry *proc_entry) -{ - proc_create_data ( proc_entry->name, (S_IFREG | S_IRUGO), parent_node, - &ops, proc_entry->callback); -} - -static int cpld_proc_install(void) -{ - struct proc_dir_entry *driver_proc_node; - - driver_proc_node = proc_mkdir("cpld", NULL); - if (driver_proc_node != NULL) { - int i; - for (i = 0; i < ARRAY_SIZE(proc_entries); i++) - cpld_proc_entry_create(driver_proc_node, - &proc_entries[i]); - } else { - printk("cannot create proc entry"); - return -1; - } - return 0; -} -#else -static inline int cpld_proc_install(void) {} -#endif - -static int easy98000_addon_probe(struct platform_device *pdev) -{ - return cpld_proc_install(); -} - -static int easy98000_addon_remove(struct platform_device *pdev) -{ -#if defined(CONFIG_PROC_FS) - char buf[64]; - int i; - - for (i = 0; i < sizeof(proc_entries) / sizeof(proc_entries[0]); i++) { - sprintf(buf, "cpld/%s", proc_entries[i].name); - remove_proc_entry(buf, 0); - } - remove_proc_entry("cpld", 0); -#endif - return 0; -} - -static struct platform_driver easy98000_addon_driver = { - .probe = easy98000_addon_probe, - .remove = __devexit_p(easy98000_addon_remove), - .driver = { - .name = "easy98000_addon", - .owner = THIS_MODULE, - }, -}; - -int __init easy98000_addon_init(void) -{ - return platform_driver_register(&easy98000_addon_driver); -} - -void __exit easy98000_addon_exit(void) -{ - platform_driver_unregister(&easy98000_addon_driver); -} - -module_init(easy98000_addon_init); -module_exit(easy98000_addon_exit); diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.c deleted file mode 100644 index d02d2617e0..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * EASY98000 CPLD LED driver - * - * Copyright (C) 2010 Ralph Hempel <ralph.hempel@lantiq.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/version.h> -#include <linux/types.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/errno.h> -#include <linux/leds.h> -#include <linux/slab.h> - -#include "dev-leds-easy98000-cpld.h" - -const char *led_name[8] = { - "ge0_act", - "ge0_link", - "ge1_act", - "ge1_link", - "fe2_act", - "fe2_link", - "fe3_act", - "fe3_link" -}; - -#define cpld_base7 ((u16 *)(KSEG1 | 0x17c0000c)) -#define cpld_base8 ((u16 *)(KSEG1 | 0x17c00012)) - -#define ltq_r16(reg) __raw_readw(reg) -#define ltq_w16(val, reg) __raw_writew(val, reg) - -struct cpld_led_dev { - struct led_classdev cdev; - u8 mask; - u16 *base; -}; - -struct cpld_led_drvdata { - struct cpld_led_dev *led_devs; - int num_leds; -}; - -void led_set(u8 mask, u16 *base) -{ - ltq_w16(ltq_r16(base) | mask, base); -} - -void led_clear(u8 mask, u16 *base) -{ - ltq_w16(ltq_r16(base) & (~mask), base); -} - -void led_blink_clear(u8 mask, u16 *base) -{ - led_clear(mask, base); -} - -static void led_brightness(struct led_classdev *led_cdev, - enum led_brightness value) -{ - struct cpld_led_dev *led_dev = - container_of(led_cdev, struct cpld_led_dev, cdev); - - if (value) - led_set(led_dev->mask, led_dev->base); - else - led_clear(led_dev->mask, led_dev->base); -} - -static int led_probe(struct platform_device *pdev) -{ - int i; - char name[32]; - struct cpld_led_drvdata *drvdata; - int ret = 0; - - drvdata = kzalloc(sizeof(struct cpld_led_drvdata) + - sizeof(struct cpld_led_dev) * MAX_LED, - GFP_KERNEL); - if (!drvdata) - return -ENOMEM; - - drvdata->led_devs = (struct cpld_led_dev *) &drvdata[1]; - - for (i = 0; i < MAX_LED; i++) { - struct cpld_led_dev *led_dev = &drvdata->led_devs[i]; - led_dev->cdev.brightness_set = led_brightness; - led_dev->cdev.default_trigger = NULL; - led_dev->mask = 1 << (i % 8); - if(i < 8) { - sprintf(name, "easy98000-cpld:%s", led_name[i]); - led_dev->base = cpld_base8; - } else { - sprintf(name, "easy98000-cpld:red:%d", i-8); - led_dev->base = cpld_base7; - } - led_dev->cdev.name = name; - ret = led_classdev_register(&pdev->dev, &led_dev->cdev); - if (ret) - goto err; - } - platform_set_drvdata(pdev, drvdata); - return 0; - -err: - printk("led_probe: 3\n"); - for (i = i - 1; i >= 0; i--) - led_classdev_unregister(&drvdata->led_devs[i].cdev); - - kfree(drvdata); - return ret; -} - -static int led_remove(struct platform_device *pdev) -{ - int i; - struct cpld_led_drvdata *drvdata = platform_get_drvdata(pdev); - for (i = 0; i < MAX_LED; i++) - led_classdev_unregister(&drvdata->led_devs[i].cdev); - kfree(drvdata); - return 0; -} - -static struct platform_driver led_driver = { - .probe = led_probe, - .remove = __devexit_p(led_remove), - .driver = { - .name = LED_NAME, - .owner = THIS_MODULE, - }, -}; - -int __init easy98000_cpld_led_init(void) -{ - pr_info(LED_DESC ", Version " LED_VERSION - " (c) Copyright 2011, Lantiq Deutschland GmbH\n"); - return platform_driver_register(&led_driver); -} - -void __exit easy98000_cpld_led_exit(void) -{ - platform_driver_unregister(&led_driver); -} - -module_init(easy98000_cpld_led_init); -module_exit(easy98000_cpld_led_exit); - -MODULE_DESCRIPTION(LED_NAME); -MODULE_DESCRIPTION(LED_DESC); -MODULE_AUTHOR("Ralph Hempel <ralph.hempel@lantiq.com>"); -MODULE_LICENSE("GPL v2"); - diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.h deleted file mode 100644 index 3160189fe9..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * EASY98000 CPLD LED driver - * - * Copyright (C) 2010 Ralph Hempel <ralph.hempel@lantiq.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. - * - */ -#ifndef _INCLUDE_EASY98000_CPLD_LED_H_ -#define _INCLUDE_EASY98000_CPLD_LED_H_ - -#define LED_NAME "easy98000_cpld_led" -#define LED_DESC "EASY98000 LED driver" -#define LED_VERSION "1.0.0" - -#define MAX_LED 16 - -#endif /* _INCLUDE_EASY98000_CPLD_LED_H_ */ diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-95C3AM1.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-95C3AM1.c deleted file mode 100644 index 42a3344ae9..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-95C3AM1.c +++ /dev/null @@ -1,94 +0,0 @@ -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/i2c-gpio.h> - -#include <dev-gpio-leds.h> - -#include "../machtypes.h" -#include "devices.h" - -#define BOARD_95C3AM1_GPIO_LED_0 10 -#define BOARD_95C3AM1_GPIO_LED_1 11 -#define BOARD_95C3AM1_GPIO_LED_2 12 -#define BOARD_95C3AM1_GPIO_LED_3 13 - -static struct mtd_partition board_95C3AM1_partitions[] = -{ - { - .name = "uboot", - .offset = 0x0, - .size = 0x40000, - }, - { - .name = "uboot_env", - .offset = 0x40000, - .size = 0x40000, /* 2 sectors for redundant env. */ - }, - { - .name = "linux", - .offset = 0x80000, - .size = 0xF80000, /* map only 16 MiB */ - }, -}; - -static struct flash_platform_data board_95C3AM1_flash_platform_data = { - .name = "sflash", - .parts = board_95C3AM1_partitions, - .nr_parts = ARRAY_SIZE(board_95C3AM1_partitions) -}; - -static struct spi_board_info board_95C3AM1_flash_data __initdata = { - .modalias = "m25p80", - .bus_num = 0, - .chip_select = 0, - .max_speed_hz = 10 * 1000 * 1000, - .mode = SPI_MODE_3, - .platform_data = &board_95C3AM1_flash_platform_data -}; - -static struct gpio_led board_95C3AM1_gpio_leds[] __initdata = { - { - .name = "power", - .gpio = BOARD_95C3AM1_GPIO_LED_0, - .active_low = 0, - }, { - .name = "optical", - .gpio = BOARD_95C3AM1_GPIO_LED_1, - .active_low = 0, - }, { - .name = "lan", - .gpio = BOARD_95C3AM1_GPIO_LED_2, - .active_low = 0, - }, { - .name = "update", - .gpio = BOARD_95C3AM1_GPIO_LED_3, - .active_low = 0, - } -}; - -static struct i2c_gpio_platform_data board_95C3AM1_i2c_gpio_data = { - .sda_pin = 107, - .scl_pin = 108, -}; - -static struct platform_device board_95C3AM1_i2c_gpio_device = { - .name = "i2c-gpio", - .id = 0, - .dev = { - .platform_data = &board_95C3AM1_i2c_gpio_data, - } -}; - -static void __init board_95C3AM1_init(void) -{ - falcon_register_i2c(); - falcon_register_spi_flash(&board_95C3AM1_flash_data); - platform_device_register(&board_95C3AM1_i2c_gpio_device); - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(board_95C3AM1_gpio_leds), - board_95C3AM1_gpio_leds); -} - -MIPS_MACHINE(LANTIQ_MACH_95C3AM1, - "95C3AM1", - "95C3AM1 Board", - board_95C3AM1_init); diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-easy98020.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-easy98020.c deleted file mode 100644 index 4cdfc199db..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-easy98020.c +++ /dev/null @@ -1,118 +0,0 @@ -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/leds.h> -#include <linux/gpio.h> -#include <linux/gpio_buttons.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/input.h> -#include <linux/interrupt.h> -#include <linux/spi/spi.h> -#include <linux/spi/flash.h> - -#include <dev-gpio-leds.h> - -#include "../machtypes.h" -#include "devices.h" - -#define EASY98020_GPIO_LED_0 9 -#define EASY98020_GPIO_LED_1 10 -#define EASY98020_GPIO_LED_2 11 -#define EASY98020_GPIO_LED_3 12 -#define EASY98020_GPIO_LED_GE0_ACT 110 -#define EASY98020_GPIO_LED_GE0_LINK 109 -#define EASY98020_GPIO_LED_GE1_ACT 106 -#define EASY98020_GPIO_LED_GE1_LINK 105 - -static struct mtd_partition easy98020_spi_partitions[] = -{ - { - .name = "uboot", - .offset = 0x0, - .size = 0x40000, - }, - { - .name = "uboot_env", - .offset = 0x40000, - .size = 0x40000, /* 2 sectors for redundant env. */ - }, - { - .name = "linux", - .offset = 0x80000, - .size = 0xF80000, /* map only 16 MiB */ - }, -}; - -static struct flash_platform_data easy98020_spi_flash_platform_data = { - .name = "sflash", - .parts = easy98020_spi_partitions, - .nr_parts = ARRAY_SIZE(easy98020_spi_partitions) -}; - -static struct spi_board_info easy98020_spi_flash_data __initdata = { - .modalias = "m25p80", - .bus_num = 0, - .chip_select = 0, - .max_speed_hz = 10 * 1000 * 1000, - .mode = SPI_MODE_3, - .platform_data = &easy98020_spi_flash_platform_data -}; - -static struct gpio_led easy98020_gpio_leds[] __initdata = { - { - .name = "easy98020:green:0", - .gpio = EASY98020_GPIO_LED_0, - .active_low = 0, - }, { - .name = "easy98020:green:1", - .gpio = EASY98020_GPIO_LED_1, - .active_low = 0, - }, { - .name = "easy98020:green:2", - .gpio = EASY98020_GPIO_LED_2, - .active_low = 0, - }, { - .name = "easy98020:green:3", - .gpio = EASY98020_GPIO_LED_3, - .active_low = 0, - }, { - .name = "easy98020:ge0_act", - .gpio = EASY98020_GPIO_LED_GE0_ACT, - .active_low = 0, - }, { - .name = "easy98020:ge0_link", - .gpio = EASY98020_GPIO_LED_GE0_LINK, - .active_low = 0, - }, { - .name = "easy98020:ge1_act", - .gpio = EASY98020_GPIO_LED_GE1_ACT, - .active_low = 0, - }, { - .name = "easy98020:ge1_link", - .gpio = EASY98020_GPIO_LED_GE1_LINK, - .active_low = 0, - } -}; - -static void __init easy98020_init(void) -{ - falcon_register_i2c(); - falcon_register_spi_flash(&easy98020_spi_flash_data); - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(easy98020_gpio_leds), - easy98020_gpio_leds); -} - -MIPS_MACHINE(LANTIQ_MACH_EASY98020, - "EASY98020", - "EASY98020 Eval Board", - easy98020_init); - -MIPS_MACHINE(LANTIQ_MACH_EASY98020_1LAN, - "EASY98020_1LAN", - "EASY98020 Eval Board (1 LAN port)", - easy98020_init); - -MIPS_MACHINE(LANTIQ_MACH_EASY98020_2LAN, - "EASY98020_2LAN", - "EASY98020 Eval Board (2 LAN ports)", - easy98020_init); diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.c deleted file mode 100644 index 90b63fc72d..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - * - * Copyright (C) 2010 John Crispin <blogic@openwrt.org> - */ - -#include <linux/init.h> -#include <linux/module.h> -#include <linux/types.h> -#include <linux/string.h> -#include <linux/mtd/physmap.h> -#include <linux/kernel.h> -#include <linux/reboot.h> -#include <linux/platform_device.h> -#include <linux/leds.h> -#include <linux/etherdevice.h> -#include <linux/reboot.h> -#include <linux/time.h> -#include <linux/io.h> -#include <linux/gpio.h> -#include <linux/leds.h> - -#include <asm/bootinfo.h> -#include <asm/irq.h> - -#include <lantiq_soc.h> -#include <lantiq_irq.h> -#include <lantiq_platform.h> - -#define LTQ_USB_IOMEM_BASE 0x1e101000 -#define LTQ_USB_IOMEM_SIZE 0x00001000 - -static struct resource resources[] = -{ - [0] = { - .name = "dwc_otg_membase", - .start = LTQ_USB_IOMEM_BASE, - .end = LTQ_USB_IOMEM_BASE + LTQ_USB_IOMEM_SIZE - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .name = "dwc_otg_irq", - .start = LTQ_USB_INT, - .flags = IORESOURCE_IRQ, - }, -}; - -static u64 dwc_dmamask = (u32)0x1fffffff; - -static struct platform_device platform_dev = { - .name = "dwc_otg", - .dev = { - .dma_mask = &dwc_dmamask, - }, - .resource = resources, - .num_resources = ARRAY_SIZE(resources), -}; - -int __init -xway_register_dwc(int pin) -{ - struct irq_data d; - d.irq = resources[1].start; - ltq_enable_irq(&d); - platform_dev.dev.platform_data = (void*) pin; - return platform_device_register(&platform_dev); -} diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.h deleted file mode 100644 index 521fad05ef..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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. - * - * Copyright (C) 2010 John Crispin <blogic@openwrt.org> - */ - -#ifndef _LTQ_DEV_DWC_H__ -#define _LTQ_DEV_DWC_H__ - -#include <lantiq_platform.h> - -extern void __init xway_register_dwc(int pin); - -#endif diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.c deleted file mode 100644 index 14fd5113db..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2011 John Crispin <blogic@openwrt.org> - * Copyright (C) 2011 Andrej Vlašić <andrej.vlasic0@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/init.h> -#include <linux/platform_device.h> -#include <linux/ath5k_platform.h> -#include <linux/pci.h> - -#include "dev-wifi-ath5k.h" - -extern int (*ltqpci_plat_dev_init)(struct pci_dev *dev); -struct ath5k_platform_data ath5k_pdata; - -static int -ath5k_pci_plat_dev_init(struct pci_dev *dev) -{ - dev->dev.platform_data = &ath5k_pdata; - return 0; -} - -void __init -ltq_register_ath5k(u16 *eeprom_data, u8 *macaddr) -{ - ath5k_pdata.eeprom_data = eeprom_data; - ath5k_pdata.macaddr = macaddr; - ltqpci_plat_dev_init = ath5k_pci_plat_dev_init; -} diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.h deleted file mode 100644 index 37f6e411f2..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2011 John Crispin <blogic@openwrt.org> - * Copyright (C) 2011 Andrej Vlašić <andrej.vlasic0@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. - */ - -#ifndef _DEV_WIFI_ATH5K_H__ -#define _DEV_WIFI_ATH5K_H__ - -extern void ltq_register_ath5k(u16 *eeprom_data, u8 *macaddr); - -#endif diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.c deleted file mode 100644 index 94932df785..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2011 John Crispin <blogic@openwrt.org> - * - * 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/init.h> -#include <linux/platform_device.h> -#include <linux/rt2x00_platform.h> -#include <linux/pci.h> - -#include "dev-wifi-rt2x00.h" - -extern int (*ltqpci_plat_dev_init)(struct pci_dev *dev); -struct rt2x00_platform_data rt2x00_pdata; - -static int -rt2x00_pci_plat_dev_init(struct pci_dev *dev) -{ - dev->dev.platform_data = &rt2x00_pdata; - return 0; -} - -void __init -ltq_register_rt2x00(const char *firmware) -{ - rt2x00_pdata.eeprom_file_name = kstrdup(firmware, GFP_KERNEL); - ltqpci_plat_dev_init = rt2x00_pci_plat_dev_init; -} diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.h deleted file mode 100644 index 060ca50270..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright (C) 2011 John Crispin <blogic@openwrt.org> - * - * 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. - */ - -#ifndef _DEV_WIFI_RT2X00_H__ -#define _DEV_WIFI_RT2X00_H__ - -extern void ltq_register_rt2x00(const char *firmware); - -#endif diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c deleted file mode 100644 index 9be1a5fb93..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c +++ /dev/null @@ -1,665 +0,0 @@ -/* - * 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. - * - * Copyright (C) 2010 John Crispin <blogic@openwrt.org> - */ - -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/leds.h> -#include <linux/gpio.h> -#include <linux/gpio_buttons.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/mtd/physmap.h> -#include <linux/input.h> -#include <linux/etherdevice.h> -#include <linux/ath5k_platform.h> -#include <linux/pci.h> - -#include <lantiq_soc.h> -#include <lantiq_platform.h> -#include <dev-gpio-leds.h> -#include <dev-gpio-buttons.h> - -#include "../machtypes.h" -#include "dev-wifi-rt2x00.h" -#include "dev-wifi-ath5k.h" -#include "devices.h" -#include "dev-dwc_otg.h" - -static struct mtd_partition arv4510_partitions[] = -{ - { - .name = "uboot", - .offset = 0x0, - .size = 0x20000, - }, - { - .name = "uboot_env", - .offset = 0x20000, - .size = 0x120000, - }, - { - .name = "linux", - .offset = 0x40000, - .size = 0xfa0000, - }, - { - .name = "board_config", - .offset = 0xfe0000, - .size = 0x20000, - }, -}; - -static struct mtd_partition arv45xx_partitions[] = -{ - { - .name = "uboot", - .offset = 0x0, - .size = 0x20000, - }, - { - .name = "uboot_env", - .offset = 0x20000, - .size = 0x10000, - }, - { - .name = "linux", - .offset = 0x30000, - .size = 0x3c0000, - }, - { - .name = "board_config", - .offset = 0x3f0000, - .size = 0x10000, - }, -}; - -static struct mtd_partition arv45xx_brnboot_partitions[] = -{ - { - .name = "brn-boot", - .offset = 0x0, - .size = 0x20000, - }, - { - .name = "config", - .offset = 0x20000, - .size = 0x30000, - }, - { - .name = "linux", - .offset = 0x50000, - .size = 0x390000, - }, - { - .name = "reserved", /* 12-byte signature at 0x3efff4 :/ */ - .offset = 0x3e0000, - .size = 0x010000, - }, - { - .name = "eeprom", - .offset = 0x3f0000, - .size = 0x10000, - }, -}; - -static struct mtd_partition arv7525_partitions[] = -{ - { - .name = "uboot", - .offset = 0x0, - .size = 0x10000, - }, - { - .name = "uboot_env", - .offset = 0x10000, - .size = 0x10000, - }, - { - .name = "linux", - .offset = 0x20000, - .size = 0x3d0000, - }, - { - .name = "board_config", - .offset = 0x3f0000, - .size = 0x10000, - }, -}; - -static struct mtd_partition arv75xx_partitions[] = -{ - { - .name = "uboot", - .offset = 0x0, - .size = 0x10000, - }, - { - .name = "uboot_env", - .offset = 0x10000, - .size = 0x10000, - }, - { - .name = "linux", - .offset = 0x20000, - .size = 0x7d0000, - }, - { - .name = "board_config", - .offset = 0x7f0000, - .size = 0x10000, - }, -}; - -static struct physmap_flash_data arv4510_flash_data = { - .nr_parts = ARRAY_SIZE(arv4510_partitions), - .parts = arv4510_partitions, -}; - -static struct physmap_flash_data arv45xx_flash_data = { - .nr_parts = ARRAY_SIZE(arv45xx_partitions), - .parts = arv45xx_partitions, -}; - -static struct physmap_flash_data arv45xx_brnboot_flash_data = { - .nr_parts = ARRAY_SIZE(arv45xx_brnboot_partitions), - .parts = arv45xx_brnboot_partitions, -}; - -static struct physmap_flash_data arv7525_flash_data = { - .nr_parts = ARRAY_SIZE(arv7525_partitions), - .parts = arv7525_partitions, -}; - -static struct physmap_flash_data arv75xx_flash_data = { - .nr_parts = ARRAY_SIZE(arv75xx_partitions), - .parts = arv75xx_partitions, -}; - -static struct ltq_pci_data ltq_pci_data = { - .clock = PCI_CLOCK_EXT, - .gpio = PCI_GNT1 | PCI_REQ1, - .irq = { - [14] = INT_NUM_IM0_IRL0 + 22, - }, -}; - -static struct ltq_eth_data ltq_eth_data = { - .mii_mode = PHY_INTERFACE_MODE_RMII, -}; - -static struct gpio_led -arv4510pw_gpio_leds[] __initdata = { - { .name = "soc:green:foo", .gpio = 4, .active_low = 1, }, -}; - -static struct gpio_led -arv4518pw_gpio_leds[] __initdata = { - { .name = "soc:green:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:wifi", .gpio = 6, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:red:fail", .gpio = 8, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:usb", .gpio = 19, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:voip", .gpio = 100, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:fxs1", .gpio = 101, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:fxs2", .gpio = 102, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" }, -}; - -static struct gpio_keys_button -arv4518pw_gpio_keys[] __initdata = { - { - .desc = "wifi", - .type = EV_KEY, - .code = BTN_0, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 28, - .active_low = 1, - }, - { - .desc = "reset", - .type = EV_KEY, - .code = BTN_1, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 30, - .active_low = 1, - }, - { - .desc = "wps", - .type = EV_KEY, - .code = BTN_2, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 29, - .active_low = 1, - }, -}; - -static struct gpio_led -arv4520pw_gpio_leds[] __initdata = { - { .name = "soc:blue:power", .gpio = 3, .active_low = 1, }, - { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, }, - { .name = "soc:blue:internet", .gpio = 5, .active_low = 1, }, - { .name = "soc:red:power", .gpio = 6, .active_low = 1, }, - { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, }, - { .name = "soc:red:wps", .gpio = 9, .active_low = 1, }, - { .name = "soc:blue:voip", .gpio = 100, .active_low = 1, }, - { .name = "soc:blue:fxs1", .gpio = 101, .active_low = 1, }, - { .name = "soc:blue:fxs2", .gpio = 102, .active_low = 1, }, - { .name = "soc:blue:fxo", .gpio = 103, .active_low = 1, }, - { .name = "soc:blue:voice", .gpio = 104, .active_low = 1, }, - { .name = "soc:blue:usb", .gpio = 105, .active_low = 1, }, - { .name = "soc:blue:wifi", .gpio = 106, .active_low = 1, }, -}; - -static struct gpio_led -arv452cpw_gpio_leds[] __initdata = { - { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:isdn", .gpio = 5, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:red:wps", .gpio = 9, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:fxs1", .gpio = 100, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:fxs2", .gpio = 101, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:wps", .gpio = 102, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:voice", .gpio = 104, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:usb", .gpio = 105, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:wifi", .gpio = 106, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:internet", .gpio = 108, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:red:internet", .gpio = 109, .active_low = 1, .default_trigger = "default-on" }, -}; - -static struct gpio_led -arv4525pw_gpio_leds[] __initdata = { - { .name = "soc:green:dsl", .gpio = 6, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:wifi", .gpio = 8, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:online", .gpio = 9, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:fxs-internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:fxs-festnetz", .gpio = 4, .active_low = 1, .default_trigger = "default-on" }, -}; - -#define ARV4525PW_PHYRESET 13 -#define ARV4525PW_RELAY 31 - -static struct gpio arv4525pw_gpios[] __initdata = { - { ARV4525PW_PHYRESET, GPIOF_OUT_INIT_HIGH, "phyreset" }, - { ARV4525PW_RELAY, GPIOF_OUT_INIT_HIGH, "relay" }, -}; - - -static struct gpio_led -arv752dpw22_gpio_leds[] __initdata = { - { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:red:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:red:wps", .gpio = 8, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:red:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:red:voice", .gpio = 104, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:usb", .gpio = 105, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:wifi", .gpio = 106, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:wifi1", .gpio = 107, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:wifi", .gpio = 108, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:blue:wifi1", .gpio = 109, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:eth1", .gpio = 111, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:eth2", .gpio = 112, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:eth3", .gpio = 113, .active_low = 1, .default_trigger = "default-on" }, - { .name = "soc:green:eth4", .gpio = 114, .active_low = 1, .default_trigger = "default-on", }, -}; - -static struct gpio_keys_button -arv752dpw22_gpio_keys[] __initdata = { - { - .desc = "btn0", - .type = EV_KEY, - .code = BTN_0, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 12, - .active_low = 1, - }, - { - .desc = "btn1", - .type = EV_KEY, - .code = BTN_1, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 13, - .active_low = 1, - }, - { - .desc = "btn2", - .type = EV_KEY, - .code = BTN_2, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 28, - .active_low = 1, - }, -}; - -static struct gpio_led -arv7518pw_gpio_leds[] __initdata = { - { .name = "soc:green:power", .gpio = 2, .active_low = 1, }, - { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, }, - { .name = "soc:green:internet", .gpio = 5, .active_low = 1, }, - { .name = "soc:green:wifi", .gpio = 6, .active_low = 1, }, - { .name = "soc:red:internet", .gpio = 8, .active_low = 1, }, - { .name = "soc:green:usb", .gpio = 19, .active_low = 1, }, -}; - -static struct gpio_keys_button -arv7518pw_gpio_keys[] __initdata = { - { - .desc = "reset", - .type = EV_KEY, - .code = BTN_0, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 23, - .active_low = 1, - }, - { - .desc = "wifi", - .type = EV_KEY, - .code = BTN_1, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 25, - .active_low = 1, - }, -}; - -static struct gpio_keys_button -arv7525pw_gpio_keys[] __initdata = { - { - .desc = "restart", - .type = EV_KEY, - .code = BTN_0, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 29, - .active_low = 1, - }, -}; - -static void -arv45xx_register_ethernet(void) -{ -#define ARV45XX_BRN_MAC 0x3f0016 - memcpy_fromio(<q_eth_data.mac.sa_data, - (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_MAC), 6); - ltq_register_etop(<q_eth_data); -} - -static void -arv75xx_register_ethernet(void) -{ -#define ARV75XX_BRN_MAC 0x7f0016 - memcpy_fromio(<q_eth_data.mac.sa_data, - (void *)KSEG1ADDR(LTQ_FLASH_START + ARV75XX_BRN_MAC), 6); - ltq_register_etop(<q_eth_data); -} - -static void -bewan_register_ethernet(void) -{ -#define BEWAN_BRN_MAC 0x3f0014 - memcpy_fromio(<q_eth_data.mac.sa_data, - (void *)KSEG1ADDR(LTQ_FLASH_START + BEWAN_BRN_MAC), 6); - ltq_register_etop(<q_eth_data); -} - -static u16 arv45xx_ath5k_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS]; -static u8 arv45xx_ath5k_eeprom_mac[6]; - -void __init -arv45xx_register_ath5k(void) -{ -#define ARV45XX_BRN_ATH 0x3f0478 - int i; - static u16 eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS]; - u32 *p = (u32*)arv45xx_ath5k_eeprom_data; - - memcpy_fromio(arv45xx_ath5k_eeprom_mac, - (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_MAC), 6); - arv45xx_ath5k_eeprom_mac[5]++; - memcpy_fromio(arv45xx_ath5k_eeprom_data, - (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_ATH), ATH5K_PLAT_EEP_MAX_WORDS); - // swap eeprom bytes - for (i = 0; i < ATH5K_PLAT_EEP_MAX_WORDS>>1; i++){ - //arv4518_ath5k_eeprom_data[i] = ((eeprom_data[i]&0xff)<<8)|((eeprom_data[i]&0xff00)>>8); - p[i] = ((eeprom_data[(i<<1)+1]&0xff)<<24)|((eeprom_data[(i<<1)+1]&0xff00)<<8)|((eeprom_data[i<<1]&0xff)<<8)|((eeprom_data[i<<1]&0xff00)>>8); - if (i == 0xbf>>1){ - // printk ("regdomain: 0x%x --> 0x%x\n", p[i], (p[i] & 0xffff0000)|0x67); - /* regdomain is invalid?? how did original fw convert - * value to 0x82d4 ?? - * for now, force to 0x67 */ - p[i] &= 0xffff0000; - p[i] |= 0x67; - } - } -} - -static void __init -arv3527p_init(void) -{ - ltq_register_gpio_stp(); - //ltq_add_device_gpio_leds(arv3527p_gpio_leds, ARRAY_SIZE(arv3527p_gpio_leds)); - ltq_register_nor(&arv45xx_flash_data); - arv45xx_register_ethernet(); -} - -MIPS_MACHINE(LANTIQ_MACH_ARV3527P, - "ARV3527P", - "ARV3527P - Arcor Easybox 401", - arv3527p_init); - -static void __init -arv4510pw_init(void) -{ - ltq_register_gpio_stp(); - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4510pw_gpio_leds), arv4510pw_gpio_leds); - ltq_register_nor(&arv4510_flash_data); - ltq_pci_data.irq[12] = (INT_NUM_IM2_IRL0 + 31); - ltq_pci_data.irq[15] = (INT_NUM_IM0_IRL0 + 26); - ltq_pci_data.gpio |= PCI_EXIN2 | PCI_REQ2; - ltq_register_pci(<q_pci_data); - bewan_register_ethernet(); -} - -MIPS_MACHINE(LANTIQ_MACH_ARV4510PW, - "ARV4510PW", - "ARV4510PW - Wippies Homebox", - arv4510pw_init); - -static void __init -arv4518pw_init(void) -{ -#define ARV4518PW_EBU 0 -#define ARV4518PW_USB 14 -#define ARV4518PW_SWITCH_RESET 13 -#define ARV4518PW_MADWIFI_ADDR 0xb07f0400 - - ltq_register_gpio_ebu(ARV4518PW_EBU); - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4518pw_gpio_leds), arv4518pw_gpio_leds); - ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, - ARRAY_SIZE(arv4518pw_gpio_keys), arv4518pw_gpio_keys); - ltq_register_nor(&arv45xx_flash_data); - ltq_pci_data.gpio = PCI_GNT2 | PCI_REQ2; - ltq_register_pci(<q_pci_data); - ltq_register_madwifi_eep(ARV4518PW_MADWIFI_ADDR); - ltq_register_ath5k(arv45xx_ath5k_eeprom_data, arv45xx_ath5k_eeprom_mac); - xway_register_dwc(ARV4518PW_USB); - arv45xx_register_ethernet(); - - gpio_request(ARV4518PW_SWITCH_RESET, "switch"); - gpio_direction_output(ARV4518PW_SWITCH_RESET, 1); - gpio_export(ARV4518PW_SWITCH_RESET, 0); -} - -MIPS_MACHINE(LANTIQ_MACH_ARV4518PW, - "ARV4518PW", - "ARV4518PW - SMC7908A-ISP, Airties WAV-221", - arv4518pw_init); - -static void __init -arv4520pw_init(void) -{ -#define ARV4520PW_EBU 0x400 -#define ARV4520PW_USB 28 -#define ARV4520PW_SWITCH_RESET 110 - - ltq_register_gpio_ebu(ARV4520PW_EBU); - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4520pw_gpio_leds), arv4520pw_gpio_leds); - ltq_register_nor(&arv45xx_flash_data); - ltq_register_pci(<q_pci_data); - ltq_register_tapi(); - arv45xx_register_ethernet(); - xway_register_dwc(ARV4520PW_USB); - - gpio_request(ARV4520PW_SWITCH_RESET, "switch"); - gpio_set_value(ARV4520PW_SWITCH_RESET, 1); -} - -MIPS_MACHINE(LANTIQ_MACH_ARV4520PW, - "ARV4520PW", - "ARV4520PW - Airties WAV-281, Arcor A800", - arv4520pw_init); - -static void __init -arv452Cpw_init(void) -{ -#define ARV452CPW_EBU 0x77f -#define ARV452CPW_USB 28 -#define ARV452CPW_RELAY1 31 -#define ARV452CPW_RELAY2 107 -#define ARV452CPW_SWITCH_RESET 110 -#define ARV452CPW_MADWIFI_ADDR 0xb07f0400 - - ltq_register_gpio_ebu(ARV452CPW_EBU); - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv452cpw_gpio_leds), arv452cpw_gpio_leds); - ltq_register_nor(&arv45xx_flash_data); - ltq_register_pci(<q_pci_data); - ltq_register_madwifi_eep(ARV452CPW_MADWIFI_ADDR); - xway_register_dwc(ARV452CPW_USB); - arv45xx_register_ethernet(); - arv45xx_register_ath5k(); - - gpio_request(ARV452CPW_SWITCH_RESET, "switch"); - gpio_set_value(ARV452CPW_SWITCH_RESET, 1); - gpio_export(ARV452CPW_SWITCH_RESET, 0); - - gpio_request(ARV452CPW_RELAY1, "relay1"); - gpio_direction_output(ARV452CPW_RELAY1, 1); - gpio_export(ARV452CPW_RELAY1, 0); - - gpio_request(ARV452CPW_RELAY2, "relay2"); - gpio_set_value(ARV452CPW_RELAY2, 1); - gpio_export(ARV452CPW_RELAY2, 0); -} - -MIPS_MACHINE(LANTIQ_MACH_ARV452CPW, - "ARV452CPW", - "ARV452CPW - Arcor A801", - arv452Cpw_init); - -static void __init -arv4525pw_init(void) -{ -#define ARV4525PW_MADWIFI_ADDR 0xb03f0400 - if (ltq_brn_boot) - ltq_register_nor(&arv45xx_brnboot_flash_data); - else - ltq_register_nor(&arv45xx_flash_data); - - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4525pw_gpio_leds), arv4525pw_gpio_leds); - gpio_request_array(arv4525pw_gpios, ARRAY_SIZE(arv4525pw_gpios)); - gpio_export(ARV4525PW_RELAY, false); - gpio_export(ARV4525PW_PHYRESET, false); - ltq_pci_data.clock = PCI_CLOCK_INT; - ltq_register_pci(<q_pci_data); - ltq_register_madwifi_eep(ARV4525PW_MADWIFI_ADDR); - arv45xx_register_ath5k(); - ltq_register_ath5k(arv45xx_ath5k_eeprom_data, arv45xx_ath5k_eeprom_mac); - ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII; - arv45xx_register_ethernet(); -} - -MIPS_MACHINE(LANTIQ_MACH_ARV4525PW, - "ARV4525PW", - "ARV4525PW - Speedport W502V", - arv4525pw_init); - -static void __init -arv7525pw_init(void) -{ - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4525pw_gpio_leds), arv4525pw_gpio_leds); - ltq_register_nor(&arv7525_flash_data); - ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, - ARRAY_SIZE(arv7525pw_gpio_keys), arv7525pw_gpio_keys); - ltq_pci_data.clock = PCI_CLOCK_INT; - ltq_pci_data.gpio = PCI_GNT1 | PCI_EXIN1; - ltq_pci_data.irq[14] = (INT_NUM_IM3_IRL0 + 31); - ltq_register_pci(<q_pci_data); - ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII; - ltq_register_rt2x00("RT2860.eeprom"); - ltq_register_tapi(); - arv45xx_register_ethernet(); -} - -MIPS_MACHINE(LANTIQ_MACH_ARV7525PW, - "ARV7525PW", - "ARV7525PW - Speedport W303V", - arv7525pw_init); - -static void __init -arv7518pw_init(void) -{ -#define ARV7518PW_EBU 0x2 -#define ARV7518PW_USB 14 - - ltq_register_gpio_ebu(ARV7518PW_EBU); - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv7518pw_gpio_leds), arv7518pw_gpio_leds); - ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, - ARRAY_SIZE(arv7518pw_gpio_keys), arv7518pw_gpio_keys); - ltq_register_nor(&arv75xx_flash_data); - ltq_register_pci(<q_pci_data); - ltq_register_tapi(); - xway_register_dwc(ARV7518PW_USB); - arv75xx_register_ethernet(); - //arv7518_register_ath9k(mac); -} - -MIPS_MACHINE(LANTIQ_MACH_ARV7518PW, - "ARV7518PW", - "ARV7518PW - ASTORIA", - arv7518pw_init); - -static void __init -arv752dpw22_init(void) -{ -#define ARV752DPW22_EBU 0x2 -#define ARV752DPW22_USB 100 -#define ARV752DPW22_RELAY 101 - - ltq_register_gpio_ebu(ARV752DPW22_EBU); - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv752dpw22_gpio_leds), arv752dpw22_gpio_leds); - ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, - ARRAY_SIZE(arv752dpw22_gpio_keys), arv752dpw22_gpio_keys); - ltq_register_nor(&arv75xx_flash_data); - ltq_pci_data.irq[15] = (INT_NUM_IM3_IRL0 + 31); - ltq_pci_data.gpio |= PCI_EXIN1 | PCI_REQ2; - ltq_register_pci(<q_pci_data); - xway_register_dwc(ARV752DPW22_USB); - arv75xx_register_ethernet(); - - gpio_request(ARV752DPW22_RELAY, "relay"); - gpio_set_value(ARV752DPW22_RELAY, 1); - gpio_export(ARV752DPW22_RELAY, 0); -} - -MIPS_MACHINE(LANTIQ_MACH_ARV752DPW22, - "ARV752DPW22", - "ARV752DPW22 - Arcor A803", - arv752dpw22_init); diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50601.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50601.c deleted file mode 100644 index a5a01057a3..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50601.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - * - * Copyright (C) 2010 John Crispin <blogic@openwrt.org> - */ - -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/mtd/physmap.h> -#include <linux/input.h> - -#include <lantiq.h> - -#include "../machtypes.h" -#include "devices.h" - -static struct mtd_partition easy50601_partitions[] = { - { - .name = "uboot", - .offset = 0x0, - .size = 0x10000, - }, - { - .name = "uboot_env", - .offset = 0x10000, - .size = 0x10000, - }, - { - .name = "linux", - .offset = 0x20000, - .size = 0x3d0000, - }, -}; - -static struct physmap_flash_data easy50601_flash_data = { - .nr_parts = ARRAY_SIZE(easy50601_partitions), - .parts = easy50601_partitions, -}; - -static struct ltq_eth_data ltq_eth_data = { - .mii_mode = -1, /* use EPHY */ -}; - -static void __init easy50601_init(void) -{ - ltq_register_nor(&easy50601_flash_data); - ltq_register_etop(<q_eth_data); -} - -MIPS_MACHINE(LTQ_MACH_EASY50601, - "EASY50601", - "EASY50601 Eval Board", - easy50601_init); diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50712.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50712.c deleted file mode 100644 index 2fddfca6db..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50712.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - * - * Copyright (C) 2010 John Crispin <blogic@openwrt.org> - */ - -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/mtd/physmap.h> -#include <linux/input.h> -#include <linux/phy.h> - -#include <lantiq_soc.h> -#include <irq.h> - -#include "../machtypes.h" -#include "devices.h" - -static struct mtd_partition easy50712_partitions[] = { - { - .name = "uboot", - .offset = 0x0, - .size = 0x10000, - }, - { - .name = "uboot_env", - .offset = 0x10000, - .size = 0x10000, - }, - { - .name = "linux", - .offset = 0x20000, - .size = 0x3d0000, - }, -}; - -static struct physmap_flash_data easy50712_flash_data = { - .nr_parts = ARRAY_SIZE(easy50712_partitions), - .parts = easy50712_partitions, -}; - -static struct ltq_pci_data ltq_pci_data = { - .clock = PCI_CLOCK_INT, - .gpio = PCI_GNT1 | PCI_REQ1, - .irq = { - [14] = INT_NUM_IM0_IRL0 + 22, - }, -}; - -static struct ltq_eth_data ltq_eth_data = { - .mii_mode = PHY_INTERFACE_MODE_MII, -}; - -static void __init easy50712_init(void) -{ - ltq_register_gpio_stp(); - ltq_register_nor(&easy50712_flash_data); - ltq_register_pci(<q_pci_data); - ltq_register_etop(<q_eth_data); - ltq_register_tapi(); -} - -MIPS_MACHINE(LTQ_MACH_EASY50712, - "EASY50712", - "EASY50712 Eval Board", - easy50712_init); diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-fritz.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-fritz.c deleted file mode 100644 index 9b542425c8..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-fritz.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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. - * - * Copyright (C) 2010 John Crispin <blogic@openwrt.org> - */ - -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/mtd/physmap.h> -#include <linux/input.h> -#include <linux/phy.h> - -#include <lantiq_soc.h> -#include <irq.h> - -#include "../machtypes.h" -#include "devices.h" - -/*static struct mtd_partition fritz3370_partitions[] = { - { - .name = "uboot", - .offset = 0x0, - .size = 0x10000, - }, - { - .name = "uboot_env", - .offset = 0x10000, - .size = 0x10000, - }, - { - .name = "linux", - .offset = 0x20000, - .size = 0xe0000, - }, - { - .name = "rootfs", - .offset = 0x100000, - .size = 0x300000, - }, -}; - -static struct physmap_flash_data fritz3370_flash_data = { - .nr_parts = ARRAY_SIZE(fritz3370_partitions), - .parts = fritz3370_partitions, -}; - -static struct ltq_pci_data ltq_pci_data = { - .clock = PCI_CLOCK_INT, - .gpio = PCI_GNT1 | PCI_REQ1, - .irq = { - [14] = INT_NUM_IM0_IRL0 + 22, - }, -}; -*/ -static struct ltq_eth_data ltq_eth_data = { - .mii_mode = PHY_INTERFACE_MODE_MII, -}; - -extern void xway_register_nand(void); - -static void __init fritz3370_init(void) -{ -// ltq_register_gpio_stp(); -// ltq_register_nor(&fritz3370_flash_data); -// ltq_register_pci(<q_pci_data); - ltq_register_etop(<q_eth_data); - xway_register_nand(); -} - -MIPS_MACHINE(LANTIQ_MACH_FRITZ3370, - "FRITZ3370", - "FRITZ!BOX 3370", - fritz3370_init); diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.c deleted file mode 100644 index 3dbfcb94d4..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.c +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 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. - * - * Copyright (C) 2011 Andrej Vlašić - * Copyright (C) 2011 Luka Perkov - * - */ - -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/leds.h> -#include <linux/gpio.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/mtd/physmap.h> -#include <linux/input.h> -#include <linux/ath5k_platform.h> -#include <linux/pci.h> -#include <linux/phy.h> -#include <linux/io.h> -#include <linux/string.h> - -#include <irq.h> -#include <lantiq_soc.h> -#include <lantiq_platform.h> -#include <dev-gpio-leds.h> -#include <dev-gpio-buttons.h> - -#include "../machtypes.h" -#include "dev-wifi-ath5k.h" -#include "devices.h" -#include "dev-dwc_otg.h" - -#include "mach-gigasx76x.h" - -#define UBOOT_ENV_OFFSET 0x010000 -#define UBOOT_ENV_SIZE 0x010000 - -static struct mtd_partition gigasx76x_partitions[] = -{ - { - .name = "uboot", - .offset = 0x000000, - .size = 0x010000, - }, - { - .name = "uboot_env", - .offset = UBOOT_ENV_OFFSET, - .size = UBOOT_ENV_SIZE, - }, - { - .name = "linux", - .offset = 0x020000, - .size = 0x7e0000, - }, -}; - -static struct gpio_led -gigasx76x_gpio_leds[] __initdata = { - { .name = "soc:green:voip", .gpio = 216, }, - { .name = "soc:green:adsl", .gpio = 217, }, - { .name = "soc:green:usb", .gpio = 218, }, - { .name = "soc:green:wifi", .gpio = 219, }, - { .name = "soc:green:phone2", .gpio = 220, }, - { .name = "soc:green:phone1", .gpio = 221, }, - { .name = "soc:green:line", .gpio = 222, }, - { .name = "soc:green:online", .gpio = 223, }, -}; - -static struct gpio_keys_button -gigasx76x_gpio_keys[] __initdata = { - { - .desc = "wps", - .type = EV_KEY, - .code = KEY_WPS_BUTTON, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 22, - .active_low = 1, - }, - { - .desc = "reset", - .type = EV_KEY, - .code = BTN_0, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 14, - .active_low = 0, - }, -}; - -static struct physmap_flash_data gigasx76x_flash_data = { - .nr_parts = ARRAY_SIZE(gigasx76x_partitions), - .parts = gigasx76x_partitions, -}; - -static struct ltq_pci_data ltq_pci_data = { - .clock = PCI_CLOCK_INT, - .gpio = PCI_GNT1 | PCI_REQ1, - .irq = { [14] = INT_NUM_IM0_IRL0 + 22, }, -}; - -static struct ltq_eth_data ltq_eth_data = { - .mii_mode = PHY_INTERFACE_MODE_MII, -}; - -static char __init *get_uboot_env_var(char *haystack, int haystack_len, char *needle, int needle_len) { - int i; - for (i = 0; i <= haystack_len - needle_len; i++) { - if (memcmp(haystack + i, needle, needle_len) == 0) { - return haystack + i + needle_len; - } - } - return NULL; -} - -/* - * gigasx76x_parse_hex_* are not uniq. in arm/orion there are also duplicates: - * dns323_parse_hex_* - * TODO: one day write a patch for this :) - */ -static int __init gigasx76x_parse_hex_nibble(char n) { - if (n >= '0' && n <= '9') - return n - '0'; - - if (n >= 'A' && n <= 'F') - return n - 'A' + 10; - - if (n >= 'a' && n <= 'f') - return n - 'a' + 10; - - return -1; -} - -static int __init gigasx76x_parse_hex_byte(const char *b) { - int hi; - int lo; - - hi = gigasx76x_parse_hex_nibble(b[0]); - lo = gigasx76x_parse_hex_nibble(b[1]); - - if (hi < 0 || lo < 0) - return -1; - - return (hi << 4) | lo; -} - -static u16 gigasx76x_ath5k_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS]; -static u8 gigasx76x_ath5k_eeprom_mac[6]; - -static int __init gigasx76x_register_ethernet(void) { - u_int8_t addr[6]; - int i; - char *uboot_env_page; - char *mac; - char *boardid; - - uboot_env_page = ioremap(LTQ_FLASH_START + UBOOT_ENV_OFFSET, UBOOT_ENV_SIZE); - if (!uboot_env_page) - return -ENOMEM; - - mac = get_uboot_env_var(uboot_env_page, UBOOT_ENV_SIZE, "\0ethaddr=", 9); - boardid = get_uboot_env_var(uboot_env_page, UBOOT_ENV_SIZE, "\0boardid=", 9); - - if (!mac) { - goto error_fail; - } - - if (!boardid) { - goto error_fail; - } - - /* Sanity check the string we're looking at */ - for (i = 0; i < 5; i++) { - if (*(mac + (i * 3) + 2) != ':') { - goto error_fail; - } - } - - for (i = 0; i < 6; i++) { - int byte; - byte = gigasx76x_parse_hex_byte(mac + (i * 3)); - if (byte < 0) { - goto error_fail; - } - addr[i] = byte; - } - - iounmap(uboot_env_page); - printk("GIGASX76X: Found ethernet MAC address: "); - for (i = 0; i < 6; i++) - printk("%.2x%s", addr[i], (i < 5) ? ":" : ".\n"); - - memcpy(<q_eth_data.mac.sa_data, addr, 6); - ltq_register_etop(<q_eth_data); - - memcpy(&gigasx76x_ath5k_eeprom_mac, addr, 6); - gigasx76x_ath5k_eeprom_mac[5]++; - - if (strncmp(boardid, "sx763", 5) == 0) { - printk("GIGASX76X: Board id is sx763."); - memcpy(&gigasx76x_ath5k_eeprom_data, sx763_eeprom_data, ATH5K_PLAT_EEP_MAX_WORDS); - } else if (strncmp(boardid, "sx762", 5) == 0) { - printk("GIGASX76X: Board id is sx762."); - memcpy(&gigasx76x_ath5k_eeprom_data, sx762_eeprom_data, ATH5K_PLAT_EEP_MAX_WORDS); - } else { - printk("GIGASX76X: Board id is unknown, fix uboot_env data."); - } - - return 0; - - error_fail: - iounmap(uboot_env_page); - return -EINVAL; -} - -static void __init gigasx76x_init(void) { -#define GIGASX76X_USB 29 -#define GIGASX76X_MADWIFI_ADDR 0xb07f0000 - - ltq_register_gpio_stp(); - ltq_register_nor(&gigasx76x_flash_data); - ltq_register_pci(<q_pci_data); - ltq_register_tapi(); - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(gigasx76x_gpio_leds), gigasx76x_gpio_leds); - ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, ARRAY_SIZE(gigasx76x_gpio_keys), gigasx76x_gpio_keys); - ltq_register_ath5k(gigasx76x_ath5k_eeprom_data, gigasx76x_ath5k_eeprom_mac); - xway_register_dwc(GIGASX76X_USB); - gigasx76x_register_ethernet(); -} - -MIPS_MACHINE(LANTIQ_MACH_GIGASX76X, "GIGASX76X", "GIGASX76X - Gigaset SX761,SX762,SX763", gigasx76x_init); diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.h deleted file mode 100644 index 186a146d90..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.h +++ /dev/null @@ -1,203 +0,0 @@ -/* - * 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. - * - * Copyright (C) 2011 Andrej Vlašić - * Copyright (C) 2011 Luka Perkov - * - */ - -static u16 sx763_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS]= -{ -0x5aa5,0x168c,0x0200,0x0001,0x0000,0x5001,0x0000,0x2051,0x2051,0x1c0a,0x0100, -0x0000,0x01c2,0x0002,0xc606,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xf165,0x7fbe,0x0003,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5aa5,0x0000,0x0000,0x0313,0x4943, -0x2053,0x7104,0x1202,0x0400,0x0306,0x0001,0x0000,0x0500,0x410e,0x39b1,0x1eb5, -0x4e2d,0x3056,0xffff,0xe902,0x0700,0x0106,0x0000,0x0100,0x1500,0x0752,0x4101, -0x6874,0x7265,0x736f,0x4320,0x6d6f,0x756d,0x696e,0x6163,0x6974,0x6e6f,0x2c73, -0x4920,0x636e,0x002e,0x5241,0x3035,0x3130,0x302d,0x3030,0x2d30,0x3030,0x3030, -0x5700,0x7269,0x6c65,0x7365,0x2073,0x414c,0x204e,0x6552,0x6566,0x6572,0x636e, -0x2065,0x6143,0x6472,0x3000,0x0030,0x00ff,0x2100,0x0602,0x2201,0x0205,0x8d80, -0x005b,0x0522,0x4002,0x8954,0x2200,0x0205,0x1b00,0x00b7,0x0522,0x8002,0x12a8, -0x2201,0x0205,0x3600,0x016e,0x0522,0x0002,0x2551,0x2202,0x0205,0x6c00,0x02dc, -0x0522,0x8002,0x37f9,0x2203,0x0205,0xa200,0x044a,0x0222,0x0803,0x0822,0x0604, -0x0300,0xbe7f,0x65f1,0x0222,0x0105,0x00ff,0x0000,0x0000,0x0000,0x0000,0x0000, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0x0037,0x971f,0x5003,0x9a66,0x0001,0x81c4,0x016a, -0x02ff,0x84ff,0x15a3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x2d2c,0x0000,0x0000,0x0000,0x0000,0xe028,0xa492,0x1c00, -0x000e,0xb8ca,0x0013,0x0000,0x0000,0x6b4b,0xc059,0x1571,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x2370,0x00a5,0x9618,0x419a,0x68a2,0xda35,0x001c,0x0007,0xb0ff,0x01b5,0x0000, -0x0000,0xff70,0x19ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x3170,0x00a5,0x9618,0x419a,0x68a2,0xda35, -0x001c,0x000e,0xb0ff,0x21b5,0x0000,0x2fd8,0xff70,0x1226,0x19ff,0x07be,0x6201, -0x032e,0x0587,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1112, -0x1441,0x4231,0x3234,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,0x0000,0x8000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4d31,0x7f54,0x3c93,0x1205,0x1931, -0x492d,0x7f50,0x3c93,0x0e01,0x192d,0x0070,0x0000,0x8140,0x724b,0x2ba9,0x3a09, -0x99d9,0x1949,0x0070,0x0000,0x80e0,0x624a,0x2af8,0x35c7,0x9d47,0x1938,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x7082,0x0820,0xb882,0x0820,0x7092,0x28a0,0x8992, -0x28a0,0xa292,0x28a0,0x70a2,0xa7ac,0x0000,0x0000,0x2464,0x6424,0x0000,0x0000, -0x70a2,0xa7ac,0x0000,0x0000,0x2464,0x6424,0x0000,0x0000,0x8989,0x0000,0x0000, -0x0000,0x2424,0x0000,0x0000,0x0000,0x7075,0xa2ac,0xb800,0x0000,0x2464,0x2424, -0x2400,0x0000,0x7075,0xa2ac,0x0000,0x0000,0x2464,0x2424,0x0000,0x0000,0x7075, -0xa7ac,0x0000,0x0000,0x2464,0x6424,0x0000,0x0000,0x7075,0xa7ac,0x0000,0x0000, -0x2464,0x6424,0x0000,0x0000,0x8989,0x0000,0x0000,0x0000,0x2424,0x0000,0x0000, -0x0000,0x0000,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff}; - -static u16 sx762_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS]= -{ -0x5aa5,0x168c,0x0200,0x0001,0x0000,0x5001,0x0000,0x2051,0x2051,0x1c0a,0x0100, -0x0000,0x01c2,0x0002,0xc606,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xf165,0x7fbe,0x0003,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x5aa5,0x0000,0x0000,0x0313,0x4943, -0x2053,0x7104,0x1202,0x0400,0x0306,0x0001,0x0000,0x0500,0x410e,0x39b1,0x1eb5, -0x4e2d,0x3056,0xffff,0xe902,0x0700,0x0106,0x0000,0x0100,0x1500,0x0752,0x4101, -0x6874,0x7265,0x736f,0x4320,0x6d6f,0x756d,0x696e,0x6163,0x6974,0x6e6f,0x2c73, -0x4920,0x636e,0x002e,0x5241,0x3035,0x3130,0x302d,0x3030,0x2d30,0x3030,0x3030, -0x5700,0x7269,0x6c65,0x7365,0x2073,0x414c,0x204e,0x6552,0x6566,0x6572,0x636e, -0x2065,0x6143,0x6472,0x3000,0x0030,0x00ff,0x2100,0x0602,0x2201,0x0205,0x8d80, -0x005b,0x0522,0x4002,0x8954,0x2200,0x0205,0x1b00,0x00b7,0x0522,0x8002,0x12a8, -0x2201,0x0205,0x3600,0x016e,0x0522,0x0002,0x2551,0x2202,0x0205,0x6c00,0x02dc, -0x0522,0x8002,0x37f9,0x2203,0x0205,0xa200,0x044a,0x0222,0x0803,0x0822,0x0604, -0x0300,0xbe7f,0x65f1,0x0222,0x0105,0x00ff,0x0000,0x0000,0x0000,0x0000,0x0000, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0x0037,0x6aaa,0x5003,0x9a66,0x0001,0x81c4,0x016a, -0x02ff,0x84ff,0x15a3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x2d2c,0x0000,0x0000,0x0000,0x0000,0xe028,0xa492,0x1c00, -0x000e,0xb8ca,0x0013,0x0000,0x0000,0x6b4b,0xc059,0x1571,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x2370,0x00a5,0x9618,0x419a,0x68a2,0xda35,0x001c,0x0007,0xb0ff,0x01b5,0x0000, -0x0000,0xff70,0x19ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x3170,0x00a5,0x9618,0x419a,0x68a2,0xda35, -0x001c,0x000e,0xb0ff,0x21b5,0x0000,0x2fd8,0xff70,0x1226,0x19ff,0x07fa,0x6201, -0x032e,0x0587,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1112, -0x1441,0x4231,0x3234,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,0x0000,0x8000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4d31,0x7f54,0x3c93,0x1205,0x1931, -0x492d,0x7f50,0x3c93,0x0e01,0x192d,0x0070,0x0000,0x8180,0x724d,0xab59,0x3a08, -0xdd79,0x2559,0x0070,0x0000,0x81a0,0x6e4d,0x2b99,0x3a09,0x9989,0x2157,0x0000, -0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, -0x0000,0x0000,0x0000,0x0000,0x7092,0x4924,0xb892,0x4924,0x7092,0x289e,0x8992, -0x289e,0xa292,0x289e,0x70a2,0xa7ac,0x0000,0x0000,0x2462,0x5e13,0x0000,0x0000, -0x70a2,0xa7ac,0x0000,0x0000,0x1e5c,0x5713,0x0000,0x0000,0x8989,0x0000,0x0000, -0x0000,0x2424,0x0000,0x0000,0x0000,0x7075,0xa2ac,0xb800,0x0000,0x2868,0x2828, -0x2800,0x0000,0x7075,0xa2ac,0x0000,0x0000,0x2868,0x2828,0x0000,0x0000,0x7075, -0xac00,0x0000,0x0000,0x2161,0x2100,0x0000,0x0000,0x7075,0xac00,0x0000,0x0000, -0x1b5b,0x1b00,0x0000,0x0000,0x8989,0x0000,0x0000,0x0000,0x2121,0x0000,0x0000, -0x0000,0x0000,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff, -0xffff,0xffff}; diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-netgear.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-netgear.c deleted file mode 100644 index 826bfe2bcd..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-netgear.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - * - * Copyright (C) 2010 John Crispin <blogic@openwrt.org> - */ - -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/mtd/physmap.h> -#include <linux/input.h> -#include <linux/phy.h> -#include <linux/spi/spi.h> - -#include <lantiq_soc.h> -#include <irq.h> - -#include "../machtypes.h" -#include "devices.h" - -static struct ltq_pci_data ltq_pci_data = { - .clock = PCI_CLOCK_INT, - .gpio = PCI_GNT1 | PCI_REQ1, - .irq = { - [14] = INT_NUM_IM0_IRL0 + 22, - }, -}; - -static struct ltq_eth_data ltq_eth_data = { - .mii_mode = PHY_INTERFACE_MODE_MII, -}; - -struct spi_board_info spi_info = { - .bus_num = 0, - .chip_select = 3, - .max_speed_hz = 25000000, - .modalias = "mx25l12805d", -}; - -struct ltq_spi_platform_data ltq_spi_data = { - .num_chipselect = 4, -}; - -static void __init dgn3500_init(void) -{ - ltq_register_pci(<q_pci_data); - ltq_register_etop(<q_eth_data); - ltq_register_spi(<q_spi_data, &spi_info, 1); -} - -MIPS_MACHINE(LANTIQ_MACH_DGN3500B, - "DGN3500B", - "Netgear DGN3500B", - dgn3500_init); diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-wbmr.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-wbmr.c deleted file mode 100644 index b11c2631bb..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-wbmr.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * 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. - * - * Copyright (C) 2010 John Crispin <blogic@openwrt.org> - */ - -#include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/leds.h> -#include <linux/gpio.h> -#include <linux/gpio_buttons.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/mtd/physmap.h> -#include <linux/input.h> - -#include <lantiq_soc.h> -#include <irq.h> -#include <dev-gpio-leds.h> -#include <dev-gpio-buttons.h> - -#include "../machtypes.h" -#include "devices.h" -#include "dev-dwc_otg.h" - -static struct mtd_partition wbmr_partitions[] = -{ - { - .name = "uboot", - .offset = 0x0, - .size = 0x40000, - }, - { - .name = "uboot-env", - .offset = 0x40000, - .size = 0x20000, - }, - { - .name = "linux", - .offset = 0x60000, - .size = 0x1f20000, - }, - { - .name = "calibration", - .offset = 0x1fe0000, - .size = 0x20000, - }, -}; - -static struct physmap_flash_data wbmr_flash_data = { - .nr_parts = ARRAY_SIZE(wbmr_partitions), - .parts = wbmr_partitions, -}; - -static struct gpio_led -wbmr_gpio_leds[] __initdata = { - { .name = "soc:blue:movie", .gpio = 20, .active_low = 1, }, - { .name = "soc:red:internet", .gpio = 18, .active_low = 1, }, - { .name = "soc:green:internet", .gpio = 17, .active_low = 1, }, - { .name = "soc:green:adsl", .gpio = 16, .active_low = 1, }, - { .name = "soc:green:wlan", .gpio = 15, .active_low = 1, }, - { .name = "soc:red:security", .gpio = 14, .active_low = 1, }, - { .name = "soc:green:power", .gpio = 1, .active_low = 1, }, - { .name = "soc:red:power", .gpio = 5, .active_low = 1, }, - { .name = "soc:green:usb", .gpio = 28, .active_low = 1, }, -}; - -static struct gpio_keys_button -wbmr_gpio_keys[] __initdata = { - { - .desc = "aoss", - .type = EV_KEY, - .code = BTN_0, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 0, - .active_low = 1, - }, - { - .desc = "reset", - .type = EV_KEY, - .code = BTN_1, - .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL, - .gpio = 37, - .active_low = 1, - }, -}; - -static struct ltq_pci_data ltq_pci_data = { - .clock = PCI_CLOCK_INT, - .gpio = PCI_GNT1 | PCI_REQ1, - .irq = { - [14] = INT_NUM_IM0_IRL0 + 22, - }, -}; - -static struct ltq_eth_data ltq_eth_data = { - .mii_mode = PHY_INTERFACE_MODE_RGMII, -}; - -static void __init -wbmr_init(void) -{ -#define WMBR_BRN_MAC 0x1fd0024 - - ltq_add_device_gpio_leds(-1, ARRAY_SIZE(wbmr_gpio_leds), wbmr_gpio_leds); - ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, ARRAY_SIZE(wbmr_gpio_keys), wbmr_gpio_keys); - ltq_register_nor(&wbmr_flash_data); - ltq_register_pci(<q_pci_data); - memcpy_fromio(<q_eth_data.mac.sa_data, - (void *)KSEG1ADDR(LTQ_FLASH_START + WMBR_BRN_MAC), 6); - ltq_register_etop(<q_eth_data); - xway_register_dwc(36); -} - -MIPS_MACHINE(LANTIQ_MACH_WBMR, - "WBMR", - "WBMR", - wbmr_init); |