From 4cf85a83e9cf83d9cb5209c87245d8a84449fcb6 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Sat, 14 Jul 2007 11:15:05 +0200 Subject: [PATCH] --- yaml --- r: 62632 b: refs/heads/master c: 5c9b9123b35e28dd7cb3012f3f8d4ea13a30631c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-iop32x/Kconfig | 7 - trunk/arch/arm/mach-iop32x/Makefile | 1 - trunk/arch/arm/mach-iop32x/em7210.c | 215 -------------- trunk/arch/arm/mach-iop32x/irq.c | 3 +- trunk/arch/arm/mach-ixp4xx/common.c | 2 +- trunk/arch/arm/plat-iop/time.c | 8 - trunk/drivers/char/watchdog/Kconfig | 16 -- trunk/drivers/char/watchdog/Makefile | 1 - trunk/drivers/char/watchdog/iop_wdt.c | 262 ------------------ trunk/include/asm-arm/arch-iop13xx/iop13xx.h | 43 --- trunk/include/asm-arm/arch-iop13xx/system.h | 34 ++- .../include/asm-arm/arch-iop13xx/uncompress.h | 3 +- .../include/asm-arm/arch-iop32x/uncompress.h | 2 +- trunk/include/asm-arm/hardware/iop3xx.h | 33 --- 15 files changed, 38 insertions(+), 594 deletions(-) delete mode 100644 trunk/arch/arm/mach-iop32x/em7210.c delete mode 100644 trunk/drivers/char/watchdog/iop_wdt.c diff --git a/[refs] b/[refs] index 679e6d1a6f23..9f1129257b2b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fe885fa2372b1d255974e71d5b7c51b1e9673835 +refs/heads/master: 5c9b9123b35e28dd7cb3012f3f8d4ea13a30631c diff --git a/trunk/arch/arm/mach-iop32x/Kconfig b/trunk/arch/arm/mach-iop32x/Kconfig index dbe07c9472ed..9bb02b6d7ae1 100644 --- a/trunk/arch/arm/mach-iop32x/Kconfig +++ b/trunk/arch/arm/mach-iop32x/Kconfig @@ -42,13 +42,6 @@ config IOP3XX_ATU Say N if the IOP is an add in card, the host system owns the PCI bus in this case. -config MACH_EM7210 - bool "Enable support for the Lanner EM7210" - help - Say Y here if you want to run your kernel on the Lanner EM7210 - board. Say also Y here if you have a SS4000e Baxter Creek NAS - appliance." - endmenu endif diff --git a/trunk/arch/arm/mach-iop32x/Makefile b/trunk/arch/arm/mach-iop32x/Makefile index cfdf8a137c2b..7b05b37e1f94 100644 --- a/trunk/arch/arm/mach-iop32x/Makefile +++ b/trunk/arch/arm/mach-iop32x/Makefile @@ -11,4 +11,3 @@ obj-$(CONFIG_MACH_GLANTANK) += glantank.o obj-$(CONFIG_ARCH_IQ80321) += iq80321.o obj-$(CONFIG_ARCH_IQ31244) += iq31244.o obj-$(CONFIG_MACH_N2100) += n2100.o -obj-$(CONFIG_MACH_EM7210) += em7210.o diff --git a/trunk/arch/arm/mach-iop32x/em7210.c b/trunk/arch/arm/mach-iop32x/em7210.c deleted file mode 100644 index c947152f9a3c..000000000000 --- a/trunk/arch/arm/mach-iop32x/em7210.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * arch/arm/mach-iop32x/em7210.c - * - * Board support code for the Lanner EM7210 platforms. - * - * Based on arch/arm/mach-iop32x/iq31244.c file. - * - * Copyright (C) 2007 Arnaud Patard - * - * 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static void __init em7210_timer_init(void) -{ - /* http://www.kwaak.net/fotos/fotos-nas/slide_24.html */ - /* 33.333 MHz crystal. */ - iop_init_time(200000000); -} - -static struct sys_timer em7210_timer = { - .init = em7210_timer_init, - .offset = iop_gettimeoffset, -}; - -/* - * EM7210 RTC - */ -static struct i2c_board_info __initdata em7210_i2c_devices[] = { - { - I2C_BOARD_INFO("rtc-rs5c372", 0x32), - .type = "rs5c372a", - }, -}; - -/* - * EM7210 I/O - */ -static struct map_desc em7210_io_desc[] __initdata = { - { /* on-board devices */ - .virtual = IQ31244_UART, - .pfn = __phys_to_pfn(IQ31244_UART), - .length = 0x00100000, - .type = MT_DEVICE, - }, -}; - -void __init em7210_map_io(void) -{ - iop3xx_map_io(); - iotable_init(em7210_io_desc, ARRAY_SIZE(em7210_io_desc)); -} - - -/* - * EM7210 PCI - */ -#define INTA IRQ_IOP32X_XINT0 -#define INTB IRQ_IOP32X_XINT1 -#define INTC IRQ_IOP32X_XINT2 -#define INTD IRQ_IOP32X_XINT3 - -static int __init -em7210_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) -{ - static int pci_irq_table[][4] = { - /* - * PCI IDSEL/INTPIN->INTLINE - * A B C D - */ - {INTB, INTB, INTB, INTB}, /* console / uart */ - {INTA, INTA, INTA, INTA}, /* 1st 82541 */ - {INTD, INTD, INTD, INTD}, /* 2nd 82541 */ - {INTC, INTC, INTC, INTC}, /* GD31244 */ - {INTD, INTA, INTA, INTA}, /* mini-PCI */ - {INTD, INTC, INTA, INTA}, /* NEC USB */ - }; - - if (pin < 1 || pin > 4) - return -1; - - return pci_irq_table[slot % 6][pin - 1]; -} - -static struct hw_pci em7210_pci __initdata = { - .swizzle = pci_std_swizzle, - .nr_controllers = 1, - .setup = iop3xx_pci_setup, - .preinit = iop3xx_pci_preinit, - .scan = iop3xx_pci_scan_bus, - .map_irq = em7210_pci_map_irq, -}; - -static int __init em7210_pci_init(void) -{ - if (machine_is_em7210()) - pci_common_init(&em7210_pci); - - return 0; -} - -subsys_initcall(em7210_pci_init); - - -/* - * EM7210 Flash - */ -static struct physmap_flash_data em7210_flash_data = { - .width = 2, -}; - -static struct resource em7210_flash_resource = { - .start = 0xf0000000, - .end = 0xf1ffffff, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device em7210_flash_device = { - .name = "physmap-flash", - .id = 0, - .dev = { - .platform_data = &em7210_flash_data, - }, - .num_resources = 1, - .resource = &em7210_flash_resource, -}; - - -/* - * EM7210 UART - * The physical address of the serial port is 0xfe800000, - * so it can be used for physical and virtual address. - */ -static struct plat_serial8250_port em7210_serial_port[] = { - { - .mapbase = IQ31244_UART, - .membase = (char *)IQ31244_UART, - .irq = IRQ_IOP32X_XINT1, - .flags = UPF_SKIP_TEST, - .iotype = UPIO_MEM, - .regshift = 0, - .uartclk = 1843200, - }, - { }, -}; - -static struct resource em7210_uart_resource = { - .start = IQ31244_UART, - .end = IQ31244_UART + 7, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device em7210_serial_device = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM, - .dev = { - .platform_data = em7210_serial_port, - }, - .num_resources = 1, - .resource = &em7210_uart_resource, -}; - -void em7210_power_off(void) -{ - *IOP3XX_GPOE &= 0xfe; - *IOP3XX_GPOD |= 0x01; -} - -static void __init em7210_init_machine(void) -{ - platform_device_register(&em7210_serial_device); - platform_device_register(&iop3xx_i2c0_device); - platform_device_register(&iop3xx_i2c1_device); - platform_device_register(&em7210_flash_device); - platform_device_register(&iop3xx_dma_0_channel); - platform_device_register(&iop3xx_dma_1_channel); - - i2c_register_board_info(0, em7210_i2c_devices, - ARRAY_SIZE(em7210_i2c_devices)); - - - pm_power_off = em7210_power_off; -} - -MACHINE_START(EM7210, "Lanner EM7210") - .phys_io = IQ31244_UART, - .io_pg_offst = ((IQ31244_UART) >> 18) & 0xfffc, - .boot_params = 0xa0000100, - .map_io = em7210_map_io, - .init_irq = iop32x_init_irq, - .timer = &em7210_timer, - .init_machine = em7210_init_machine, -MACHINE_END diff --git a/trunk/arch/arm/mach-iop32x/irq.c b/trunk/arch/arm/mach-iop32x/irq.c index 55cf0162e8c1..c971171c2905 100644 --- a/trunk/arch/arm/mach-iop32x/irq.c +++ b/trunk/arch/arm/mach-iop32x/irq.c @@ -63,8 +63,7 @@ void __init iop32x_init_irq(void) if (machine_is_glantank() || machine_is_iq80321() || machine_is_iq31244() || - machine_is_n2100() || - machine_is_em7210()) + machine_is_n2100()) *IOP3XX_PCIIRSR = 0x0f; for (i = 0; i < NR_IRQS; i++) { diff --git a/trunk/arch/arm/mach-ixp4xx/common.c b/trunk/arch/arm/mach-ixp4xx/common.c index 8112f726ffa0..4c54a86eda3a 100644 --- a/trunk/arch/arm/mach-ixp4xx/common.c +++ b/trunk/arch/arm/mach-ixp4xx/common.c @@ -188,7 +188,7 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type) *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE)); /* Configure the line as an input */ - gpio_line_config(line, IXP4XX_GPIO_IN); + gpio_line_config(irq2gpio[irq], IXP4XX_GPIO_IN); return 0; } diff --git a/trunk/arch/arm/plat-iop/time.c b/trunk/arch/arm/plat-iop/time.c index ba3d21d8fba3..100d57ad98ed 100644 --- a/trunk/arch/arm/plat-iop/time.c +++ b/trunk/arch/arm/plat-iop/time.c @@ -78,13 +78,6 @@ static struct irqaction iop_timer_irq = { .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, }; -static unsigned long iop_tick_rate; -unsigned long get_iop_tick_rate(void) -{ - return iop_tick_rate; -} -EXPORT_SYMBOL(get_iop_tick_rate); - void __init iop_init_time(unsigned long tick_rate) { u32 timer_ctl; @@ -92,7 +85,6 @@ void __init iop_init_time(unsigned long tick_rate) ticks_per_jiffy = (tick_rate + HZ/2) / HZ; ticks_per_usec = tick_rate / 1000000; next_jiffy_time = 0xffffffff; - iop_tick_rate = tick_rate; timer_ctl = IOP_TMR_EN | IOP_TMR_PRIVILEGED | IOP_TMR_RELOAD | IOP_TMR_RATIO_1_1; diff --git a/trunk/drivers/char/watchdog/Kconfig b/trunk/drivers/char/watchdog/Kconfig index a4d81cda479e..2f48ba329961 100644 --- a/trunk/drivers/char/watchdog/Kconfig +++ b/trunk/drivers/char/watchdog/Kconfig @@ -187,22 +187,6 @@ config PNX4008_WATCHDOG Say N if you are unsure. -config IOP_WATCHDOG - tristate "IOP Watchdog" - depends on WATCHDOG && PLAT_IOP - select WATCHDOG_NOWAYOUT if (ARCH_IOP32X || ARCH_IOP33X) - help - Say Y here if to include support for the watchdog timer - in the Intel IOP3XX & IOP13XX I/O Processors. This driver can - be built as a module by choosing M. The module will - be called iop_wdt. - - Note: The IOP13XX watchdog does an Internal Bus Reset which will - affect both cores and the peripherals of the IOP. The ATU-X - and/or ATUe configuration registers will remain intact, but if - operating as an Root Complex and/or Central Resource, the PCI-X - and/or PCIe busses will also be reset. THIS IS A VERY BIG HAMMER. - # AVR32 Architecture config AT32AP700X_WDT diff --git a/trunk/drivers/char/watchdog/Makefile b/trunk/drivers/char/watchdog/Makefile index bdb9d5e3bb41..3907ec04a4e5 100644 --- a/trunk/drivers/char/watchdog/Makefile +++ b/trunk/drivers/char/watchdog/Makefile @@ -35,7 +35,6 @@ obj-$(CONFIG_SA1100_WATCHDOG) += sa1100_wdt.o obj-$(CONFIG_MPCORE_WATCHDOG) += mpcore_wdt.o obj-$(CONFIG_EP93XX_WATCHDOG) += ep93xx_wdt.o obj-$(CONFIG_PNX4008_WATCHDOG) += pnx4008_wdt.o -obj-$(CONFIG_IOP_WATCHDOG) += iop_wdt.o # AVR32 Architecture obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o diff --git a/trunk/drivers/char/watchdog/iop_wdt.c b/trunk/drivers/char/watchdog/iop_wdt.c deleted file mode 100644 index bbbd91af754d..000000000000 --- a/trunk/drivers/char/watchdog/iop_wdt.c +++ /dev/null @@ -1,262 +0,0 @@ -/* - * drivers/char/watchdog/iop_wdt.c - * - * WDT driver for Intel I/O Processors - * Copyright (C) 2005, Intel Corporation. - * - * Based on ixp4xx driver, Copyright 2004 (c) MontaVista, Software, Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope 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. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place - Suite 330, Boston, MA 02111-1307 USA. - * - * Curt E Bruns - * Peter Milne - * Dan Williams - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static int nowayout = WATCHDOG_NOWAYOUT; -static unsigned long wdt_status; -static unsigned long boot_status; - -#define WDT_IN_USE 0 -#define WDT_OK_TO_CLOSE 1 -#define WDT_ENABLED 2 - -static unsigned long iop_watchdog_timeout(void) -{ - return (0xffffffffUL / get_iop_tick_rate()); -} - -/** - * wdt_supports_disable - determine if we are accessing a iop13xx watchdog - * or iop3xx by whether it has a disable command - */ -static int wdt_supports_disable(void) -{ - int can_disable; - - if (IOP_WDTCR_EN_ARM != IOP_WDTCR_DIS_ARM) - can_disable = 1; - else - can_disable = 0; - - return can_disable; -} - -static void wdt_enable(void) -{ - /* Arm and enable the Timer to starting counting down from 0xFFFF.FFFF - * Takes approx. 10.7s to timeout - */ - write_wdtcr(IOP_WDTCR_EN_ARM); - write_wdtcr(IOP_WDTCR_EN); -} - -/* returns 0 if the timer was successfully disabled */ -static int wdt_disable(void) -{ - /* Stop Counting */ - if (wdt_supports_disable()) { - write_wdtcr(IOP_WDTCR_DIS_ARM); - write_wdtcr(IOP_WDTCR_DIS); - clear_bit(WDT_ENABLED, &wdt_status); - printk(KERN_INFO "WATCHDOG: Disabled\n"); - return 0; - } else - return 1; -} - -static int iop_wdt_open(struct inode *inode, struct file *file) -{ - if (test_and_set_bit(WDT_IN_USE, &wdt_status)) - return -EBUSY; - - clear_bit(WDT_OK_TO_CLOSE, &wdt_status); - - wdt_enable(); - - set_bit(WDT_ENABLED, &wdt_status); - - return nonseekable_open(inode, file); -} - -static ssize_t -iop_wdt_write(struct file *file, const char *data, size_t len, - loff_t *ppos) -{ - if (len) { - if (!nowayout) { - size_t i; - - clear_bit(WDT_OK_TO_CLOSE, &wdt_status); - - for (i = 0; i != len; i++) { - char c; - - if (get_user(c, data + i)) - return -EFAULT; - if (c == 'V') - set_bit(WDT_OK_TO_CLOSE, &wdt_status); - } - } - wdt_enable(); - } - - return len; -} - -static struct watchdog_info ident = { - .options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING, - .identity = "iop watchdog", -}; - -static int -iop_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) -{ - int options; - int ret = -ENOTTY; - - switch (cmd) { - case WDIOC_GETSUPPORT: - if (copy_to_user - ((struct watchdog_info *)arg, &ident, sizeof ident)) - ret = -EFAULT; - else - ret = 0; - break; - - case WDIOC_GETSTATUS: - ret = put_user(0, (int *)arg); - break; - - case WDIOC_GETBOOTSTATUS: - ret = put_user(boot_status, (int *)arg); - break; - - case WDIOC_GETTIMEOUT: - ret = put_user(iop_watchdog_timeout(), (int *)arg); - break; - - case WDIOC_KEEPALIVE: - wdt_enable(); - ret = 0; - break; - - case WDIOC_SETOPTIONS: - if (get_user(options, (int *)arg)) - return -EFAULT; - - if (options & WDIOS_DISABLECARD) { - if (!nowayout) { - if (wdt_disable() == 0) { - set_bit(WDT_OK_TO_CLOSE, &wdt_status); - ret = 0; - } else - ret = -ENXIO; - } else - ret = 0; - } - - if (options & WDIOS_ENABLECARD) { - wdt_enable(); - ret = 0; - } - break; - } - - return ret; -} - -static int iop_wdt_release(struct inode *inode, struct file *file) -{ - int state = 1; - if (test_bit(WDT_OK_TO_CLOSE, &wdt_status)) - if (test_bit(WDT_ENABLED, &wdt_status)) - state = wdt_disable(); - - /* if the timer is not disbaled reload and notify that we are still - * going down - */ - if (state != 0) { - wdt_enable(); - printk(KERN_CRIT "WATCHDOG: Device closed unexpectedly - " - "reset in %lu seconds\n", iop_watchdog_timeout()); - } - - clear_bit(WDT_IN_USE, &wdt_status); - clear_bit(WDT_OK_TO_CLOSE, &wdt_status); - - return 0; -} - -static const struct file_operations iop_wdt_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .write = iop_wdt_write, - .ioctl = iop_wdt_ioctl, - .open = iop_wdt_open, - .release = iop_wdt_release, -}; - -static struct miscdevice iop_wdt_miscdev = { - .minor = WATCHDOG_MINOR, - .name = "watchdog", - .fops = &iop_wdt_fops, -}; - -static int __init iop_wdt_init(void) -{ - int ret; - - ret = misc_register(&iop_wdt_miscdev); - if (ret == 0) - printk("iop watchdog timer: timeout %lu sec\n", - iop_watchdog_timeout()); - - /* check if the reset was caused by the watchdog timer */ - boot_status = (read_rcsr() & IOP_RCSR_WDT) ? WDIOF_CARDRESET : 0; - - /* Configure Watchdog Timeout to cause an Internal Bus (IB) Reset - * NOTE: An IB Reset will Reset both cores in the IOP342 - */ - write_wdtsr(IOP13XX_WDTCR_IB_RESET); - - return ret; -} - -static void __exit iop_wdt_exit(void) -{ - misc_deregister(&iop_wdt_miscdev); -} - -module_init(iop_wdt_init); -module_exit(iop_wdt_exit); - -module_param(nowayout, int, 0); -MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); - -MODULE_AUTHOR("Curt E Bruns "); -MODULE_DESCRIPTION("iop watchdog timer driver"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff --git a/trunk/include/asm-arm/arch-iop13xx/iop13xx.h b/trunk/include/asm-arm/arch-iop13xx/iop13xx.h index 52b7fab7ef60..d4e4f828577c 100644 --- a/trunk/include/asm-arm/arch-iop13xx/iop13xx.h +++ b/trunk/include/asm-arm/arch-iop13xx/iop13xx.h @@ -19,39 +19,6 @@ static inline int iop13xx_cpu_id(void) return id; } -/* WDTCR CP6 R7 Page 9 */ -static inline u32 read_wdtcr(void) -{ - u32 val; - asm volatile("mrc p6, 0, %0, c7, c9, 0":"=r" (val)); - return val; -} -static inline void write_wdtcr(u32 val) -{ - asm volatile("mcr p6, 0, %0, c7, c9, 0"::"r" (val)); -} - -/* WDTSR CP6 R8 Page 9 */ -static inline u32 read_wdtsr(void) -{ - u32 val; - asm volatile("mrc p6, 0, %0, c8, c9, 0":"=r" (val)); - return val; -} -static inline void write_wdtsr(u32 val) -{ - asm volatile("mcr p6, 0, %0, c8, c9, 0"::"r" (val)); -} - -/* RCSR - Reset Cause Status Register */ -static inline u32 read_rcsr(void) -{ - u32 val; - asm volatile("mrc p6, 0, %0, c0, c1, 0":"=r" (val)); - return val; -} - -extern unsigned long get_iop_tick_rate(void); #endif /* @@ -513,14 +480,4 @@ extern unsigned long get_iop_tick_rate(void); #define IOP13XX_PBI_LR1 IOP13XX_PBI_OFFSET(0x14) #define IOP13XX_PROCESSOR_FREQ IOP13XX_REG_ADDR32(0x2180) - -/* Watchdog timer definitions */ -#define IOP_WDTCR_EN_ARM 0x1e1e1e1e -#define IOP_WDTCR_EN 0xe1e1e1e1 -#define IOP_WDTCR_DIS_ARM 0x1f1f1f1f -#define IOP_WDTCR_DIS 0xf1f1f1f1 -#define IOP_RCSR_WDT (1 << 5) /* reset caused by watchdog timer */ -#define IOP13XX_WDTSR_WRITE_EN (1 << 31) /* used to speed up reset requests */ -#define IOP13XX_WDTCR_IB_RESET (1 << 0) - #endif /* _IOP13XX_HW_H_ */ diff --git a/trunk/include/asm-arm/arch-iop13xx/system.h b/trunk/include/asm-arm/arch-iop13xx/system.h index 8575af8db78c..127827058e1f 100644 --- a/trunk/include/asm-arm/arch-iop13xx/system.h +++ b/trunk/include/asm-arm/arch-iop13xx/system.h @@ -13,13 +13,43 @@ static inline void arch_idle(void) cpu_do_idle(); } +/* WDTCR CP6 R7 Page 9 */ +static inline u32 read_wdtcr(void) +{ + u32 val; + asm volatile("mrc p6, 0, %0, c7, c9, 0":"=r" (val)); + return val; +} +static inline void write_wdtcr(u32 val) +{ + asm volatile("mcr p6, 0, %0, c7, c9, 0"::"r" (val)); +} + +/* WDTSR CP6 R8 Page 9 */ +static inline u32 read_wdtsr(void) +{ + u32 val; + asm volatile("mrc p6, 0, %0, c8, c9, 0":"=r" (val)); + return val; +} +static inline void write_wdtsr(u32 val) +{ + asm volatile("mcr p6, 0, %0, c8, c9, 0"::"r" (val)); +} + +#define IOP13XX_WDTCR_EN_ARM 0x1e1e1e1e +#define IOP13XX_WDTCR_EN 0xe1e1e1e1 +#define IOP13XX_WDTCR_DIS_ARM 0x1f1f1f1f +#define IOP13XX_WDTCR_DIS 0xf1f1f1f1 +#define IOP13XX_WDTSR_WRITE_EN (1 << 31) +#define IOP13XX_WDTCR_IB_RESET (1 << 0) static inline void arch_reset(char mode) { /* * Reset the internal bus (warning both cores are reset) */ - write_wdtcr(IOP_WDTCR_EN_ARM); - write_wdtcr(IOP_WDTCR_EN); + write_wdtcr(IOP13XX_WDTCR_EN_ARM); + write_wdtcr(IOP13XX_WDTCR_EN); write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET); write_wdtcr(0x1000); diff --git a/trunk/include/asm-arm/arch-iop13xx/uncompress.h b/trunk/include/asm-arm/arch-iop13xx/uncompress.h index dd9c2934190e..b9525d59b7ad 100644 --- a/trunk/include/asm-arm/arch-iop13xx/uncompress.h +++ b/trunk/include/asm-arm/arch-iop13xx/uncompress.h @@ -1,6 +1,7 @@ #include #include #include +#include #define UART_BASE ((volatile u32 *)IOP13XX_UART1_PHYS) #define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) @@ -8,7 +9,7 @@ static inline void putc(char c) { while ((UART_BASE[UART_LSR] & TX_DONE) != TX_DONE) - barrier(); + cpu_relax(); UART_BASE[UART_TX] = c; } diff --git a/trunk/include/asm-arm/arch-iop32x/uncompress.h b/trunk/include/asm-arm/arch-iop32x/uncompress.h index 070f15818fe7..e64f52bf2bce 100644 --- a/trunk/include/asm-arm/arch-iop32x/uncompress.h +++ b/trunk/include/asm-arm/arch-iop32x/uncompress.h @@ -26,7 +26,7 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id) { if (machine_is_iq80321()) uart_base = (volatile u8 *)IQ80321_UART; - else if (machine_is_iq31244() || machine_is_em7210()) + else if (machine_is_iq31244()) uart_base = (volatile u8 *)IQ31244_UART; else uart_base = (volatile u8 *)0xfe800000; diff --git a/trunk/include/asm-arm/hardware/iop3xx.h b/trunk/include/asm-arm/hardware/iop3xx.h index fb90b421f31c..81ca5d3e2bff 100644 --- a/trunk/include/asm-arm/hardware/iop3xx.h +++ b/trunk/include/asm-arm/hardware/iop3xx.h @@ -194,13 +194,6 @@ extern int init_atu; #define IOP_TMR_PRIVILEGED 0x08 #define IOP_TMR_RATIO_1_1 0x00 -/* Watchdog timer definitions */ -#define IOP_WDTCR_EN_ARM 0x1e1e1e1e -#define IOP_WDTCR_EN 0xe1e1e1e1 -/* iop3xx does not support stopping the watchdog, so we just re-arm */ -#define IOP_WDTCR_DIS_ARM (IOP_WDTCR_EN_ARM) -#define IOP_WDTCR_DIS (IOP_WDTCR_EN) - /* Application accelerator unit */ #define IOP3XX_AAU_PHYS_BASE (IOP3XX_PERIPHERAL_PHYS_BASE + 0x800) #define IOP3XX_AAU_UPPER_PA (IOP3XX_AAU_PHYS_BASE + 0xa7) @@ -281,32 +274,6 @@ static inline void write_tisr(u32 val) asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val)); } -static inline u32 read_wdtcr(void) -{ - u32 val; - asm volatile("mrc p6, 0, %0, c7, c1, 0":"=r" (val)); - return val; -} -static inline void write_wdtcr(u32 val) -{ - asm volatile("mcr p6, 0, %0, c7, c1, 0"::"r" (val)); -} - -extern unsigned long get_iop_tick_rate(void); - -/* only iop13xx has these registers, we define these to present a - * common register interface for the iop_wdt driver. - */ -#define IOP_RCSR_WDT (0) -static inline u32 read_rcsr(void) -{ - return 0; -} -static inline void write_wdtsr(u32 val) -{ - do { } while (0); -} - extern struct platform_device iop3xx_dma_0_channel; extern struct platform_device iop3xx_dma_1_channel; extern struct platform_device iop3xx_aau_channel;