Skip to content

Commit

Permalink
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-…
Browse files Browse the repository at this point in the history
…linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (34 commits)
  [MIPS] tb0219: Update copyright message.
  [MIPS] MT: Fix bug in multithreaded kernels.
  [MIPS] Alchemy: Remove CONFIG_TS_AU1X00_ADS7846 from defconfigs.
  Author: Ralf Baechle <ralf@linux-mips.org>
  [MIPS] sb1250: Enable GenBus IDE in defconfig.
  [MIPS] vmlinux.ld.S: correctly indent .data section
  [MIPS] c-r3k: Implement flush_cache_range()
  [MIPS] Store sign-extend register values for PTRACE_GETREGS
  [MIPS] Alchemy: Register platform devices
  [MIPS] Add len and addr validation for MAP_FIXED mappings.
  [MIPS] IRIX: Fix off-by-one error in signal compat code.
  [MIPS] time: Replace plat_timer_setup with modern APIs.
  [MIPS] time: Fix cut'n'paste bug in Sibyte clockevent driver.
  [MIPS] time: Make c0_compare_int_usable faster
  [MIPS] time: Fix cevt-r4k.c for 64-bit kernel
  [MIPS] Sibyte: Delete {sb1250,bcm1480}_steal_irq().
  [MIPS] txx9tmr clockevent/clocksource driver
  [MIPS] Add mips_hpt_frequency check to mips_clockevent_init().
  [MIPS] IP32: Fixes after interrupt renumbering.
  [MIPS] IP27: Fix slice logic to work for arbitrary number of slices.
  ...
  • Loading branch information
Linus Torvalds committed Oct 29, 2007
2 parents db81853 + 1a3b792 commit 82798a1
Show file tree
Hide file tree
Showing 56 changed files with 773 additions and 514 deletions.
6 changes: 6 additions & 0 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ config SNI_RM

config TOSHIBA_JMR3927
bool "Toshiba JMR-TX3927 board"
select CEVT_TXX9
select DMA_NONCOHERENT
select HW_HAS_PCI
select MIPS_TX3927
Expand All @@ -597,6 +598,7 @@ config TOSHIBA_JMR3927
config TOSHIBA_RBTX4927
bool "Toshiba RBTX49[23]7 board"
select CEVT_R4K
select CEVT_TXX9
select DMA_NONCOHERENT
select HAS_TXX9_SERIAL
select HW_HAS_PCI
Expand All @@ -618,6 +620,7 @@ config TOSHIBA_RBTX4927
config TOSHIBA_RBTX4938
bool "Toshiba RBTX4938 board"
select CEVT_R4K
select CEVT_TXX9
select DMA_NONCOHERENT
select HAS_TXX9_SERIAL
select HW_HAS_PCI
Expand Down Expand Up @@ -736,6 +739,9 @@ config CEVT_GT641XX
config CEVT_R4K
bool

config CEVT_TXX9
bool

config CFE
bool

Expand Down
32 changes: 0 additions & 32 deletions arch/mips/au1000/common/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,38 +318,6 @@ static struct irq_chip level_irq_type = {
.end = end_irq,
};

#ifdef CONFIG_PM
void startup_match20_interrupt(irq_handler_t handler)
{
struct irq_desc *desc = &irq_desc[AU1000_TOY_MATCH2_INT];

static struct irqaction action;
memset(&action, 0, sizeof(struct irqaction));

/*
* This is a big problem.... since we didn't use request_irq
* when kernel/irq.c calls probe_irq_xxx this interrupt will
* be probed for usage. This will end up disabling the device :(
* Give it a bogus "action" pointer -- this will keep it from
* getting auto-probed!
*
* By setting the status to match that of request_irq() we
* can avoid it. --cgray
*/
action.dev_id = handler;
action.flags = IRQF_DISABLED;
cpus_clear(action.mask);
action.name = "Au1xxx TOY";
action.handler = handler;
action.next = NULL;

desc->action = &action;
desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);

local_enable_irq(AU1000_TOY_MATCH2_INT);
}
#endif

static void __init setup_local_irq(unsigned int irq_nr, int type, int int_req)
{
unsigned int bit = irq_nr - AU1000_INTC0_INT_BASE;
Expand Down
22 changes: 12 additions & 10 deletions arch/mips/au1000/common/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static DEFINE_SPINLOCK(time_lock);
unsigned long wtimer;

#ifdef CONFIG_PM
irqreturn_t counter0_irq(int irq, void *dev_id)
static irqreturn_t counter0_irq(int irq, void *dev_id)
{
unsigned long pc0;
int time_elapsed;
Expand Down Expand Up @@ -117,6 +117,13 @@ irqreturn_t counter0_irq(int irq, void *dev_id)
return IRQ_HANDLED;
}

struct irqaction counter0_action = {
.handler = counter0_irq,
.flags = IRQF_DISABLED,
.name = "alchemy-toy",
.dev_id = NULL,
};

/* When we wakeup from sleep, we have to "catch up" on all of the
* timer ticks we have missed.
*/
Expand Down Expand Up @@ -221,7 +228,7 @@ unsigned long cal_r4koff(void)
return (cpu_speed / HZ);
}

void __init plat_timer_setup(struct irqaction *irq)
void __init plat_time_init(void)
{
unsigned int est_freq;

Expand Down Expand Up @@ -255,15 +262,10 @@ void __init plat_timer_setup(struct irqaction *irq)
* we do this.
*/
if (no_au1xxx_32khz) {
unsigned int c0_status;

printk("WARNING: no 32KHz clock found.\n");

/* Ensure we get CPO_COUNTER interrupts.
*/
c0_status = read_c0_status();
c0_status |= IE_IRQ5;
write_c0_status(c0_status);
/* Ensure we get CPO_COUNTER interrupts. */
set_c0_status(IE_IRQ5);
}
else {
while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C0S);
Expand All @@ -280,7 +282,7 @@ void __init plat_timer_setup(struct irqaction *irq)
au_writel(last_match20 + MATCH20_INC, SYS_TOYMATCH2);
au_sync();
while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_M20);
startup_match20_interrupt(counter0_irq);
setup_irq(AU1000_TOY_MATCH2_INT, &counter0_action);

/* We can use the real 'wait' instruction.
*/
Expand Down
1 change: 1 addition & 0 deletions arch/mips/au1000/mtx-1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
#

lib-y := init.o board_setup.o irqmap.o
obj-y := platform.o
86 changes: 86 additions & 0 deletions arch/mips/au1000/mtx-1/platform.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* MTX-1 platform devices registration
*
* Copyright (C) 2007, Florian Fainelli <florian@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <linux/init.h>
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/leds.h>

#include <asm/gpio.h>

static struct resource mtx1_wdt_res[] = {
[0] = {
.start = 15,
.end = 15,
.name = "mtx1-wdt-gpio",
.flags = IORESOURCE_IRQ,
}
};

static struct resource mtx1_sys_btn[] = {
[0] = {
.start = 7,
.end = 7,
.name = "mtx1-sys-btn-gpio",
.flags = IORESOURCE_IRQ,
}
};

static struct platform_device mtx1_wdt = {
.name = "mtx1-wdt",
.id = 0,
.num_resources = ARRAY_SIZE(mtx1_wdt_res),
.resource = mtx1_wdt_res,
};

static struct gpio_led default_leds[] = {
{
.name = "mtx1:green",
.gpio = 211,
}, {
.name = "mtx1:red",
.gpio = 212,
},
};

static struct gpio_led_platform_data mtx1_led_data = {
.num_leds = ARRAY_SIZE(default_leds),
.leds = default_leds,
};

static struct platform_device mtx1_gpio_leds = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &mtx1_led_data,
}
};

static struct __initdata platform_device * mtx1_devs[] = {
&mtx1_gpio_leds,
&mtx1_wdt
};

static int __init mtx1_register_devices(void)
{
return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs));
}

arch_initcall(mtx1_register_devices);
21 changes: 10 additions & 11 deletions arch/mips/basler/excite/excite_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,23 @@ DEFINE_SPINLOCK(titan_lock);
int titan_irqflags;


/*
* The eXcite platform uses the alternate timer interrupt
*
* Fixme: At the time of this writing cevt-r4k.c doesn't yet know about how
* to handle the alternate timer interrupt of the RM9000.
*/
void __init plat_time_init(void)
{
const u32 modebit5 = ocd_readl(0x00e4);
unsigned int
mult = ((modebit5 >> 11) & 0x1f) + 2,
div = ((modebit5 >> 16) & 0x1f) + 2;
unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2,
unsigned int div = ((modebit5 >> 16) & 0x1f) + 2;

if (div == 33) div = 1;
if (div == 33)
div = 1;
mips_hpt_frequency = EXCITE_CPU_EXT_CLOCK * mult / div / 2;
}

void __init plat_timer_setup(struct irqaction *irq)
{
/* The eXcite platform uses the alternate timer interrupt */
set_c0_intcontrol(0x80);
setup_irq(TIMER_IRQ, irq);
}

static int __init excite_init_console(void)
{
#if defined(CONFIG_SERIAL_8250)
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/db1000_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,6 @@ CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_AU1X00_GPIO is not set
# CONFIG_TS_AU1X00_ADS7846 is not set

#
# Serial drivers
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/db1100_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@ CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_AU1X00_GPIO is not set
# CONFIG_TS_AU1X00_ADS7846 is not set

#
# Serial drivers
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/db1200_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,6 @@ CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_AU1X00_GPIO is not set
# CONFIG_TS_AU1X00_ADS7846 is not set

#
# Serial drivers
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/db1500_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,6 @@ CONFIG_SERIO_RAW=m
# CONFIG_VT is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_AU1X00_GPIO is not set
# CONFIG_TS_AU1X00_ADS7846 is not set

#
# Serial drivers
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/db1550_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,6 @@ CONFIG_SERIO_RAW=m
# CONFIG_VT is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_AU1X00_GPIO is not set
# CONFIG_TS_AU1X00_ADS7846 is not set

#
# Serial drivers
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/pb1100_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,6 @@ CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_AU1X00_GPIO is not set
# CONFIG_TS_AU1X00_ADS7846 is not set

#
# Serial drivers
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/pb1500_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,6 @@ CONFIG_SERIO_RAW=m
# CONFIG_VT is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_AU1X00_GPIO is not set
# CONFIG_TS_AU1X00_ADS7846 is not set

#
# Serial drivers
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/pb1550_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,6 @@ CONFIG_SERIO_RAW=m
# CONFIG_VT is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_AU1X00_GPIO is not set
# CONFIG_TS_AU1X00_ADS7846 is not set

#
# Serial drivers
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/configs/sb1250-swarm_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ CONFIG_BLK_DEV_IDEFLOPPY=y
#
CONFIG_IDE_GENERIC=y
# CONFIG_BLK_DEV_IDEPCI is not set
# CONFIG_BLK_DEV_IDE_SWARM is not set
CONFIG_BLK_DEV_IDE_SWARM=y
# CONFIG_IDE_ARM is not set
# CONFIG_BLK_DEV_IDEDMA is not set
# CONFIG_IDEDMA_AUTO is not set
Expand Down
6 changes: 0 additions & 6 deletions arch/mips/gt64120/wrppmc/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@

#define WRPPMC_CPU_CLK_FREQ 40000000 /* 40MHZ */

void __init plat_timer_setup(struct irqaction *irq)
{
/* Install ISR for timer interrupt */
setup_irq(WRPPMC_MIPS_TIMER_IRQ, irq);
}

/*
* Estimate CPU frequency. Sets mips_hpt_frequency as a side-effect
*
Expand Down
Loading

0 comments on commit 82798a1

Please sign in to comment.