Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182016
b: refs/heads/master
c: 7e50b2b
h: refs/heads/master
v: v3
  • Loading branch information
Manuel Lauss authored and Ralf Baechle committed Feb 27, 2010
1 parent 2aa4647 commit bffc10d
Show file tree
Hide file tree
Showing 21 changed files with 193 additions and 349 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95a437966dba642870a93d16bf82af8926bb2082
refs/heads/master: 7e50b2b741bb4f9dbddc9f56972ef82a7d4b33ed
15 changes: 7 additions & 8 deletions trunk/arch/mips/alchemy/common/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@
static int au1x_ic_settype(unsigned int irq, unsigned int flow_type);

/* per-processor fixed function irqs */
struct au1xxx_irqmap au1xxx_ic0_map[] __initdata = {

struct au1xxx_irqmap {
int im_irq;
int im_type;
int im_request;
} au1xxx_ic0_map[] __initdata = {
#if defined(CONFIG_SOC_AU1000)
{ AU1000_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 0 },
{ AU1000_UART1_INT, IRQ_TYPE_LEVEL_HIGH, 0 },
Expand Down Expand Up @@ -547,7 +550,7 @@ asmlinkage void plat_irq_dispatch(void)
}

/* setup edge/level and assign request 0/1 */
void __init au1xxx_setup_irqmap(struct au1xxx_irqmap *map, int count)
static void __init setup_irqmap(struct au1xxx_irqmap *map, int count)
{
unsigned int bit, irq_nr;

Expand Down Expand Up @@ -619,11 +622,7 @@ void __init arch_init_irq(void)
/*
* Initialize IC0, which is fixed per processor.
*/
au1xxx_setup_irqmap(au1xxx_ic0_map, ARRAY_SIZE(au1xxx_ic0_map));

/* Boards can register additional (GPIO-based) IRQs.
*/
board_init_irq();
setup_irqmap(au1xxx_ic0_map, ARRAY_SIZE(au1xxx_ic0_map));

set_c0_status(IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3);
}
2 changes: 1 addition & 1 deletion trunk/arch/mips/alchemy/devboards/db1x00/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# Makefile for the Alchemy Semiconductor DBAu1xx0 boards.
#

obj-y := board_setup.o irqmap.o
obj-y := board_setup.o
51 changes: 51 additions & 0 deletions trunk/arch/mips/alchemy/devboards/db1x00/board_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,45 @@

#include <linux/gpio.h>
#include <linux/init.h>
#include <linux/interrupt.h>

#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-db1x00/db1x00.h>
#include <asm/mach-db1x00/bcsr.h>

#include <prom.h>

#ifdef CONFIG_MIPS_DB1500
char irq_tab_alchemy[][5] __initdata = {
[12] = { -1, INTA, INTX, INTX, INTX }, /* IDSEL 12 - HPT371 */
[13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */
};
#endif

#ifdef CONFIG_MIPS_BOSPORUS
char irq_tab_alchemy[][5] __initdata = {
[11] = { -1, INTA, INTB, INTX, INTX }, /* IDSEL 11 - miniPCI */
[12] = { -1, INTA, INTX, INTX, INTX }, /* IDSEL 12 - SN1741 */
[13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot */
};
#endif

#ifdef CONFIG_MIPS_MIRAGE
char irq_tab_alchemy[][5] __initdata = {
[11] = { -1, INTD, INTX, INTX, INTX }, /* IDSEL 11 - SMI VGX */
[12] = { -1, INTX, INTX, INTC, INTX }, /* IDSEL 12 - PNX1300 */
[13] = { -1, INTA, INTB, INTX, INTX }, /* IDSEL 13 - miniPCI */
};
#endif

#ifdef CONFIG_MIPS_DB1550
char irq_tab_alchemy[][5] __initdata = {
[11] = { -1, INTC, INTX, INTX, INTX }, /* IDSEL 11 - on-board HPT371 */
[12] = { -1, INTB, INTC, INTD, INTA }, /* IDSEL 12 - PCI slot 2 (left) */
[13] = { -1, INTA, INTB, INTC, INTD }, /* IDSEL 13 - PCI slot 1 (right) */
};
#endif

const char *get_system_type(void)
{
#ifdef CONFIG_MIPS_BOSPORUS
Expand Down Expand Up @@ -149,3 +181,22 @@ void __init board_setup(void)

au_sync();
}

static int __init db1x00_init_irq(void)
{
#if defined(CONFIG_MIPS_MIRAGE)
set_irq_type(AU1000_GPIO_7, IRQF_TRIGGER_RISING); /* TS pendown */
#elif defined(CONFIG_MIPS_DB1550)
set_irq_type(AU1000_GPIO_3, IRQF_TRIGGER_LOW); /* CARD0# */
set_irq_type(AU1000_GPIO_5, IRQF_TRIGGER_LOW); /* CARD1# */
#else
set_irq_type(AU1000_GPIO_0, IRQF_TRIGGER_LOW); /* CD0# */
set_irq_type(AU1000_GPIO_3, IRQF_TRIGGER_LOW); /* CD1# */
set_irq_type(AU1000_GPIO_2, IRQF_TRIGGER_LOW); /* CARD0# */
set_irq_type(AU1000_GPIO_5, IRQF_TRIGGER_LOW); /* CARD1# */
set_irq_type(AU1000_GPIO_1, IRQF_TRIGGER_LOW); /* STSCHG0# */
set_irq_type(AU1000_GPIO_4, IRQF_TRIGGER_LOW); /* STSCHG1# */
#endif
return 0;
}
arch_initcall(db1x00_init_irq);
90 changes: 0 additions & 90 deletions trunk/arch/mips/alchemy/devboards/db1x00/irqmap.c

This file was deleted.

17 changes: 7 additions & 10 deletions trunk/arch/mips/alchemy/devboards/pb1000/board_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
#include <prom.h>


struct au1xxx_irqmap __initdata au1xxx_irq_map[] = {
{ AU1000_GPIO_15, IRQF_TRIGGER_LOW, 0 },
};


const char *get_system_type(void)
{
return "Alchemy Pb1000";
Expand All @@ -46,11 +41,6 @@ void board_reset(void)
{
}

void __init board_init_irq(void)
{
au1xxx_setup_irqmap(au1xxx_irq_map, ARRAY_SIZE(au1xxx_irq_map));
}

void __init board_setup(void)
{
u32 pin_func, static_cfg0;
Expand Down Expand Up @@ -193,3 +183,10 @@ void __init board_setup(void)
break;
}
}

static int __init pb1000_init_irq(void)
{
set_irq_type(AU1000_GPIO_15, IRQF_TRIGGER_LOW);
return 0;
}
arch_initcall(pb1000_init_irq);
24 changes: 11 additions & 13 deletions trunk/arch/mips/alchemy/devboards/pb1100/board_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@
#include <prom.h>


struct au1xxx_irqmap __initdata au1xxx_irq_map[] = {
{ AU1000_GPIO_9, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card Fully_Inserted# */
{ AU1000_GPIO_10, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card STSCHG# */
{ AU1000_GPIO_11, IRQF_TRIGGER_LOW, 0 }, /* PCMCIA Card IRQ# */
{ AU1000_GPIO_13, IRQF_TRIGGER_LOW, 0 }, /* DC_IRQ# */
};


const char *get_system_type(void)
{
return "Alchemy Pb1100";
Expand All @@ -53,11 +45,6 @@ void board_reset(void)
bcsr_write(BCSR_SYSTEM, 0);
}

void __init board_init_irq(void)
{
au1xxx_setup_irqmap(au1xxx_irq_map, ARRAY_SIZE(au1xxx_irq_map));
}

void __init board_setup(void)
{
volatile void __iomem *base = (volatile void __iomem *)0xac000000UL;
Expand Down Expand Up @@ -158,3 +145,14 @@ void __init board_setup(void)
au_sync();
}
}

static int __init pb1100_init_irq(void)
{
set_irq_type(AU1000_GPIO_9, IRQF_TRIGGER_LOW); /* PCCD# */
set_irq_type(AU1000_GPIO_10, IRQF_TRIGGER_LOW); /* PCSTSCHG# */
set_irq_type(AU1000_GPIO_11, IRQF_TRIGGER_LOW); /* PCCard# */
set_irq_type(AU1000_GPIO_13, IRQF_TRIGGER_LOW); /* DC_IRQ# */

return 0;
}
arch_initcall(pb1100_init_irq);
2 changes: 1 addition & 1 deletion trunk/arch/mips/alchemy/devboards/pb1200/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# Makefile for the Alchemy Semiconductor Pb1200/DBAu1200 boards.
#

obj-y := board_setup.o irqmap.o platform.o
obj-y := board_setup.o platform.o

EXTRA_CFLAGS += -Werror
46 changes: 44 additions & 2 deletions trunk/arch/mips/alchemy/devboards/pb1200/board_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,23 @@
*/

#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/sched.h>

#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-db1x00/bcsr.h>

#include <prom.h>
#include <au1xxx.h>
#ifdef CONFIG_MIPS_PB1200
#include <asm/mach-pb1x00/pb1200.h>
#endif

#ifdef CONFIG_MIPS_DB1200
#include <asm/mach-db1x00/db1200.h>
#define PB1200_INT_BEGIN DB1200_INT_BEGIN
#define PB1200_INT_END DB1200_INT_END
#endif

#include <prom.h>

const char *get_system_type(void)
{
Expand Down Expand Up @@ -137,6 +147,38 @@ void __init board_setup(void)
au_sync();
}

static int __init pb1200_init_irq(void)
{
#ifdef CONFIG_MIPS_PB1200
/* We have a problem with CPLD rev 3. */
if (BCSR_WHOAMI_CPLD(bcsr_read(BCSR_WHOAMI)) <= 3) {
printk(KERN_ERR "WARNING!!!\n");
printk(KERN_ERR "WARNING!!!\n");
printk(KERN_ERR "WARNING!!!\n");
printk(KERN_ERR "WARNING!!!\n");
printk(KERN_ERR "WARNING!!!\n");
printk(KERN_ERR "WARNING!!!\n");
printk(KERN_ERR "Pb1200 must be at CPLD rev 4. Please have Pb1200\n");
printk(KERN_ERR "updated to latest revision. This software will\n");
printk(KERN_ERR "not work on anything less than CPLD rev 4.\n");
printk(KERN_ERR "WARNING!!!\n");
printk(KERN_ERR "WARNING!!!\n");
printk(KERN_ERR "WARNING!!!\n");
printk(KERN_ERR "WARNING!!!\n");
printk(KERN_ERR "WARNING!!!\n");
printk(KERN_ERR "WARNING!!!\n");
panic("Game over. Your score is 0.");
}
#endif

set_irq_type(AU1000_GPIO_7, IRQF_TRIGGER_LOW);
bcsr_init_irq(PB1200_INT_BEGIN, PB1200_INT_END, AU1000_GPIO_7);

return 0;
}
arch_initcall(pb1200_init_irq);


int board_au1200fb_panel(void)
{
return (bcsr_read(BCSR_SWITCHES) >> 8) & 0x0f;
Expand Down
Loading

0 comments on commit bffc10d

Please sign in to comment.