Skip to content

Commit

Permalink
MIPS: Alchemy: devboards: consolidate files
Browse files Browse the repository at this point in the history
Share some code and merge small files:
- Extract the prom init code from all devboard files (they only differ in
  memory configuration).
- Merge the irq configuration into board setup code.
- Merge smaller files into board setup code.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 delete mode 100644 arch/mips/alchemy/devboards/db1x00/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1000/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1000/irqmap.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1100/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1100/irqmap.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1200/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1500/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1500/irqmap.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1550/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1550/irqmap.c
 create mode 100644 arch/mips/alchemy/devboards/prom.c
  • Loading branch information
Manuel Lauss authored and Ralf Baechle committed Jan 11, 2009
1 parent 58e75e8 commit 23ba25d
Show file tree
Hide file tree
Showing 23 changed files with 107 additions and 481 deletions.
1 change: 1 addition & 0 deletions arch/mips/alchemy/devboards/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Alchemy Develboards
#

obj-y += prom.o
obj-$(CONFIG_MIPS_PB1000) += pb1000/
obj-$(CONFIG_MIPS_PB1100) += pb1100/
obj-$(CONFIG_MIPS_PB1200) += pb1200/
Expand Down
2 changes: 1 addition & 1 deletion 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.
#

lib-y := init.o board_setup.o irqmap.o
obj-y := board_setup.o irqmap.o
9 changes: 9 additions & 0 deletions arch/mips/alchemy/devboards/db1x00/board_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@

static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR;

const char *get_system_type(void)
{
#ifdef CONFIG_MIPS_BOSPORUS
return "Alchemy Bosporus Gateway Reference";
#else
return "Alchemy Db1x00";
#endif
}

void board_reset(void)
{
/* Hit BCSR.SW_RESET[RESET] */
Expand Down
62 changes: 0 additions & 62 deletions arch/mips/alchemy/devboards/db1x00/init.c

This file was deleted.

2 changes: 1 addition & 1 deletion arch/mips/alchemy/devboards/pb1000/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# Makefile for the Alchemy Semiconductor Pb1000 board.
#

lib-y := init.o board_setup.o irqmap.o
obj-y := board_setup.o
17 changes: 15 additions & 2 deletions arch/mips/alchemy/devboards/pb1000/board_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,25 @@
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include <linux/init.h>
#include <linux/delay.h>

#include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-pb1x00/pb1000.h>


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

int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);


const char *get_system_type(void)
{
return "Alchemy Pb1000";
}

void board_reset(void)
{
}
Expand Down
57 changes: 0 additions & 57 deletions arch/mips/alchemy/devboards/pb1000/init.c

This file was deleted.

38 changes: 0 additions & 38 deletions arch/mips/alchemy/devboards/pb1000/irqmap.c

This file was deleted.

2 changes: 1 addition & 1 deletion arch/mips/alchemy/devboards/pb1100/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# Makefile for the Alchemy Semiconductor Pb1100 board.
#

lib-y := init.o board_setup.o irqmap.o
obj-y := board_setup.o
16 changes: 16 additions & 0 deletions arch/mips/alchemy/devboards/pb1100/board_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@
#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-pb1x00/pb1100.h>


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

int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);


const char *get_system_type(void)
{
return "Alchemy Pb1100";
}

void board_reset(void)
{
/* Hit BCSR.RST_VDDI[SOFT_RESET] */
Expand Down
60 changes: 0 additions & 60 deletions arch/mips/alchemy/devboards/pb1100/init.c

This file was deleted.

40 changes: 0 additions & 40 deletions arch/mips/alchemy/devboards/pb1100/irqmap.c

This file was deleted.

3 changes: 1 addition & 2 deletions arch/mips/alchemy/devboards/pb1200/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Makefile for the Alchemy Semiconductor Pb1200/DBAu1200 boards.
#

lib-y := init.o board_setup.o irqmap.o
obj-y += platform.o
obj-y := board_setup.o irqmap.o platform.o

EXTRA_CFLAGS += -Werror
5 changes: 5 additions & 0 deletions arch/mips/alchemy/devboards/pb1200/board_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
extern void _board_init_irq(void);
extern void (*board_init_irq)(void);

const char *get_system_type(void)
{
return "Alchemy Pb1200";
}

void board_reset(void)
{
bcsr->resets = 0;
Expand Down
Loading

0 comments on commit 23ba25d

Please sign in to comment.